@safaricom-mxl/web-sdk 0.0.17 → 0.0.18

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 (1250) hide show
  1. package/REACT.md +21 -5
  2. package/dist/_virtual/_rolldown/runtime.cjs +2 -0
  3. package/dist/_virtual/_rolldown/runtime.js +24 -0
  4. package/dist/api-logs/api/LogAPI/LogAPI.cjs.map +1 -1
  5. package/dist/api-logs/api/LogAPI/LogAPI.d.cts +1 -0
  6. package/dist/api-logs/api/LogAPI/LogAPI.d.cts.map +1 -1
  7. package/dist/api-logs/api/LogAPI/LogAPI.d.ts +1 -0
  8. package/dist/api-logs/api/LogAPI/LogAPI.d.ts.map +1 -1
  9. package/dist/api-logs/api/LogAPI/LogAPI.js.map +1 -1
  10. package/dist/api-logs/api/LogAPI/types.d.cts +1 -0
  11. package/dist/api-logs/api/LogAPI/types.d.cts.map +1 -1
  12. package/dist/api-logs/api/LogAPI/types.d.ts +1 -0
  13. package/dist/api-logs/api/LogAPI/types.d.ts.map +1 -1
  14. package/dist/api-logs/logAPI.cjs.map +1 -1
  15. package/dist/api-logs/logAPI.d.cts.map +1 -1
  16. package/dist/api-logs/logAPI.d.ts.map +1 -1
  17. package/dist/api-logs/logAPI.js.map +1 -1
  18. package/dist/api-logs/manager/NoOpLogManager/NoOpLogManager.cjs.map +1 -1
  19. package/dist/api-logs/manager/NoOpLogManager/NoOpLogManager.d.cts +1 -0
  20. package/dist/api-logs/manager/NoOpLogManager/NoOpLogManager.d.cts.map +1 -1
  21. package/dist/api-logs/manager/NoOpLogManager/NoOpLogManager.d.ts +1 -0
  22. package/dist/api-logs/manager/NoOpLogManager/NoOpLogManager.d.ts.map +1 -1
  23. package/dist/api-logs/manager/NoOpLogManager/NoOpLogManager.js.map +1 -1
  24. package/dist/api-logs/manager/ProxyLogManager/ProxyLogManager.cjs.map +1 -1
  25. package/dist/api-logs/manager/ProxyLogManager/ProxyLogManager.d.cts +1 -0
  26. package/dist/api-logs/manager/ProxyLogManager/ProxyLogManager.d.cts.map +1 -1
  27. package/dist/api-logs/manager/ProxyLogManager/ProxyLogManager.d.ts +1 -0
  28. package/dist/api-logs/manager/ProxyLogManager/ProxyLogManager.d.ts.map +1 -1
  29. package/dist/api-logs/manager/ProxyLogManager/ProxyLogManager.js.map +1 -1
  30. package/dist/api-page/api/PageAPI/PageAPI.cjs.map +1 -1
  31. package/dist/api-page/api/PageAPI/PageAPI.js.map +1 -1
  32. package/dist/api-page/api/PageAPI/types.d.cts.map +1 -1
  33. package/dist/api-page/api/PageAPI/types.d.ts.map +1 -1
  34. package/dist/api-page/manager/NoOpPageManager/NoOpPageManager.cjs.map +1 -1
  35. package/dist/api-page/manager/NoOpPageManager/NoOpPageManager.js.map +1 -1
  36. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.cjs.map +1 -1
  37. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.cts.map +1 -1
  38. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.ts.map +1 -1
  39. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.js.map +1 -1
  40. package/dist/api-page/pageAPI.cjs.map +1 -1
  41. package/dist/api-page/pageAPI.js.map +1 -1
  42. package/dist/api-sessions/api/SessionAPI/SessionAPI.cjs.map +1 -1
  43. package/dist/api-sessions/api/SessionAPI/SessionAPI.d.cts +1 -0
  44. package/dist/api-sessions/api/SessionAPI/SessionAPI.d.cts.map +1 -1
  45. package/dist/api-sessions/api/SessionAPI/SessionAPI.d.ts +1 -0
  46. package/dist/api-sessions/api/SessionAPI/SessionAPI.d.ts.map +1 -1
  47. package/dist/api-sessions/api/SessionAPI/SessionAPI.js.map +1 -1
  48. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.cjs.map +1 -1
  49. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.cts +2 -1
  50. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.cts.map +1 -1
  51. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts +2 -1
  52. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts.map +1 -1
  53. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.js.map +1 -1
  54. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.cjs.map +1 -1
  55. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.cts +1 -1
  56. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.cts.map +1 -1
  57. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts +1 -1
  58. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts.map +1 -1
  59. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.js.map +1 -1
  60. package/dist/api-sessions/manager/types.d.cts +1 -0
  61. package/dist/api-sessions/manager/types.d.cts.map +1 -1
  62. package/dist/api-sessions/manager/types.d.ts +1 -0
  63. package/dist/api-sessions/manager/types.d.ts.map +1 -1
  64. package/dist/api-sessions/sessionAPI.cjs.map +1 -1
  65. package/dist/api-sessions/sessionAPI.d.cts.map +1 -1
  66. package/dist/api-sessions/sessionAPI.d.ts.map +1 -1
  67. package/dist/api-sessions/sessionAPI.js.map +1 -1
  68. package/dist/api-traces/api/TraceAPI/TraceAPI.cjs.map +1 -1
  69. package/dist/api-traces/api/TraceAPI/TraceAPI.d.cts +1 -0
  70. package/dist/api-traces/api/TraceAPI/TraceAPI.d.cts.map +1 -1
  71. package/dist/api-traces/api/TraceAPI/TraceAPI.d.ts +1 -0
  72. package/dist/api-traces/api/TraceAPI/TraceAPI.d.ts.map +1 -1
  73. package/dist/api-traces/api/TraceAPI/TraceAPI.js.map +1 -1
  74. package/dist/api-traces/api/TraceAPI/types.d.cts.map +1 -1
  75. package/dist/api-traces/api/TraceAPI/types.d.ts.map +1 -1
  76. package/dist/api-traces/manager/NoOpTraceManager/NoOpTraceManager.cjs.map +1 -1
  77. package/dist/api-traces/manager/NoOpTraceManager/NoOpTraceManager.js.map +1 -1
  78. package/dist/api-traces/manager/NoOpTraceManager/NonRecordingExtendedSpan.cjs.map +1 -1
  79. package/dist/api-traces/manager/NoOpTraceManager/NonRecordingExtendedSpan.d.cts.map +1 -1
  80. package/dist/api-traces/manager/NoOpTraceManager/NonRecordingExtendedSpan.d.ts.map +1 -1
  81. package/dist/api-traces/manager/NoOpTraceManager/NonRecordingExtendedSpan.js.map +1 -1
  82. package/dist/api-traces/manager/ProxyTraceManager/ProxyTraceManager.cjs.map +1 -1
  83. package/dist/api-traces/manager/ProxyTraceManager/ProxyTraceManager.d.cts.map +1 -1
  84. package/dist/api-traces/manager/ProxyTraceManager/ProxyTraceManager.d.ts.map +1 -1
  85. package/dist/api-traces/manager/ProxyTraceManager/ProxyTraceManager.js.map +1 -1
  86. package/dist/api-traces/manager/types.d.cts.map +1 -1
  87. package/dist/api-traces/manager/types.d.ts.map +1 -1
  88. package/dist/api-traces/traceAPI.cjs.map +1 -1
  89. package/dist/api-traces/traceAPI.js.map +1 -1
  90. package/dist/api-users/api/UserAPI/UserAPI.cjs.map +1 -1
  91. package/dist/api-users/api/UserAPI/UserAPI.js.map +1 -1
  92. package/dist/api-users/api/UserAPI/types.d.cts.map +1 -1
  93. package/dist/api-users/api/UserAPI/types.d.ts.map +1 -1
  94. package/dist/api-users/manager/NoOpUserManager/NoOpUserManager.cjs.map +1 -1
  95. package/dist/api-users/manager/NoOpUserManager/NoOpUserManager.js.map +1 -1
  96. package/dist/api-users/manager/ProxyUserManager/ProxyUserManager.cjs.map +1 -1
  97. package/dist/api-users/manager/ProxyUserManager/ProxyUserManager.d.cts.map +1 -1
  98. package/dist/api-users/manager/ProxyUserManager/ProxyUserManager.d.ts.map +1 -1
  99. package/dist/api-users/manager/ProxyUserManager/ProxyUserManager.js.map +1 -1
  100. package/dist/api-users/manager/types.d.cts +1 -1
  101. package/dist/api-users/manager/types.d.ts +1 -1
  102. package/dist/api-users/manager/userConstants.cjs +7 -0
  103. package/dist/api-users/manager/userConstants.cjs.map +1 -0
  104. package/dist/api-users/manager/userConstants.d.cts +5 -0
  105. package/dist/api-users/manager/userConstants.d.cts.map +1 -0
  106. package/dist/api-users/manager/userConstants.d.ts +5 -0
  107. package/dist/api-users/manager/userConstants.d.ts.map +1 -0
  108. package/dist/api-users/manager/userConstants.js +6 -0
  109. package/dist/api-users/manager/userConstants.js.map +1 -0
  110. package/dist/api-users/userAPI.cjs.map +1 -1
  111. package/dist/api-users/userAPI.d.cts.map +1 -1
  112. package/dist/api-users/userAPI.d.ts.map +1 -1
  113. package/dist/api-users/userAPI.js.map +1 -1
  114. package/dist/common/attributes.cjs.map +1 -1
  115. package/dist/common/attributes.d.cts.map +1 -1
  116. package/dist/common/attributes.d.ts.map +1 -1
  117. package/dist/common/attributes.js.map +1 -1
  118. package/dist/exporters/MXLLogExporter/OTLPFetchLogExporter.cjs +3 -2
  119. package/dist/exporters/MXLLogExporter/OTLPFetchLogExporter.cjs.map +1 -1
  120. package/dist/exporters/MXLLogExporter/OTLPFetchLogExporter.d.cts.map +1 -1
  121. package/dist/exporters/MXLLogExporter/OTLPFetchLogExporter.d.ts.map +1 -1
  122. package/dist/exporters/MXLLogExporter/OTLPFetchLogExporter.js +1 -1
  123. package/dist/exporters/MXLLogExporter/OTLPFetchLogExporter.js.map +1 -1
  124. package/dist/exporters/MXLTraceExporter/OTLPFetchTraceExporter.cjs +3 -2
  125. package/dist/exporters/MXLTraceExporter/OTLPFetchTraceExporter.cjs.map +1 -1
  126. package/dist/exporters/MXLTraceExporter/OTLPFetchTraceExporter.js +1 -1
  127. package/dist/exporters/MXLTraceExporter/OTLPFetchTraceExporter.js.map +1 -1
  128. package/dist/exporters/otlpBrowserFetchExportDelegate.cjs.map +1 -1
  129. package/dist/exporters/otlpBrowserFetchExportDelegate.d.cts +1 -1
  130. package/dist/exporters/otlpBrowserFetchExportDelegate.d.cts.map +1 -1
  131. package/dist/exporters/otlpBrowserFetchExportDelegate.d.ts +1 -1
  132. package/dist/exporters/otlpBrowserFetchExportDelegate.d.ts.map +1 -1
  133. package/dist/exporters/otlpBrowserFetchExportDelegate.js.map +1 -1
  134. package/dist/index.d.cts +3 -3
  135. package/dist/index.d.ts +3 -3
  136. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.cts +1 -1
  137. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.ts +1 -1
  138. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.cjs +1 -1
  139. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.cjs.map +1 -1
  140. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.cts +2 -2
  141. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.ts +2 -2
  142. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.js +1 -1
  143. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.js.map +1 -1
  144. package/dist/instrumentations/MXLInstrumentationBase/types.d.cts +1 -1
  145. package/dist/instrumentations/MXLInstrumentationBase/types.d.cts.map +1 -1
  146. package/dist/instrumentations/MXLInstrumentationBase/types.d.ts +1 -1
  147. package/dist/instrumentations/MXLInstrumentationBase/types.d.ts.map +1 -1
  148. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.cjs.map +1 -1
  149. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.d.cts.map +1 -1
  150. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.d.ts.map +1 -1
  151. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.js.map +1 -1
  152. package/dist/instrumentations/clicks/ClicksInstrumentation/types.d.cts +1 -0
  153. package/dist/instrumentations/clicks/ClicksInstrumentation/types.d.cts.map +1 -1
  154. package/dist/instrumentations/clicks/ClicksInstrumentation/types.d.ts +1 -0
  155. package/dist/instrumentations/clicks/ClicksInstrumentation/types.d.ts.map +1 -1
  156. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.cjs.map +1 -1
  157. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.cts.map +1 -1
  158. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.ts.map +1 -1
  159. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.js.map +1 -1
  160. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.cts.map +1 -1
  161. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.ts.map +1 -1
  162. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.cjs +1 -1
  163. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.cjs.map +1 -1
  164. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.d.cts.map +1 -1
  165. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.d.ts.map +1 -1
  166. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.js +1 -1
  167. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.js.map +1 -1
  168. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.cjs.map +1 -1
  169. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.js.map +1 -1
  170. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/types.d.cts +1 -0
  171. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/types.d.cts.map +1 -1
  172. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/types.d.ts +1 -0
  173. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/types.d.ts.map +1 -1
  174. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.cjs.map +1 -1
  175. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.js.map +1 -1
  176. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/types.d.cts +1 -0
  177. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/types.d.cts.map +1 -1
  178. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/types.d.ts +1 -0
  179. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/types.d.ts.map +1 -1
  180. package/dist/instrumentations/exceptions/react/MXLErrorBoundary/MXLErrorBoundary.cjs +1 -1
  181. package/dist/instrumentations/exceptions/react/MXLErrorBoundary/MXLErrorBoundary.cjs.map +1 -1
  182. package/dist/instrumentations/exceptions/react/MXLErrorBoundary/MXLErrorBoundary.js +1 -1
  183. package/dist/instrumentations/exceptions/react/MXLErrorBoundary/MXLErrorBoundary.js.map +1 -1
  184. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.cjs +2 -2
  185. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.cjs.map +1 -1
  186. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.d.cts +2 -1
  187. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.d.cts.map +1 -1
  188. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.d.ts +2 -1
  189. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.d.ts.map +1 -1
  190. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.js +2 -2
  191. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.js.map +1 -1
  192. package/dist/instrumentations/loaf/LoafInstrumentation/types.d.cts +1 -0
  193. package/dist/instrumentations/loaf/LoafInstrumentation/types.d.cts.map +1 -1
  194. package/dist/instrumentations/loaf/LoafInstrumentation/types.d.ts +1 -0
  195. package/dist/instrumentations/loaf/LoafInstrumentation/types.d.ts.map +1 -1
  196. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.cjs +1 -1
  197. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.cjs.map +1 -1
  198. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.cts.map +1 -1
  199. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.ts.map +1 -1
  200. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.js +1 -1
  201. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.js.map +1 -1
  202. package/dist/instrumentations/navigation/NavigationInstrumentation/react/createReactRouterNavigationInstrumentation.cjs.map +1 -1
  203. package/dist/instrumentations/navigation/NavigationInstrumentation/react/createReactRouterNavigationInstrumentation.d.cts +1 -0
  204. package/dist/instrumentations/navigation/NavigationInstrumentation/react/createReactRouterNavigationInstrumentation.d.cts.map +1 -1
  205. package/dist/instrumentations/navigation/NavigationInstrumentation/react/createReactRouterNavigationInstrumentation.d.ts +1 -0
  206. package/dist/instrumentations/navigation/NavigationInstrumentation/react/createReactRouterNavigationInstrumentation.d.ts.map +1 -1
  207. package/dist/instrumentations/navigation/NavigationInstrumentation/react/createReactRouterNavigationInstrumentation.js.map +1 -1
  208. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.cjs +3 -3
  209. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.cjs.map +1 -1
  210. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.js +4 -2
  211. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.js.map +1 -1
  212. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.cjs.map +1 -1
  213. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.js.map +1 -1
  214. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/types.d.cts.map +1 -1
  215. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/types.d.ts.map +1 -1
  216. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.cjs +3 -3
  217. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.cjs.map +1 -1
  218. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.js +4 -2
  219. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.js.map +1 -1
  220. package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.cts +1 -0
  221. package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.cts.map +1 -1
  222. package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.ts +1 -0
  223. package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.ts.map +1 -1
  224. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.cjs +5 -22
  225. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.cjs.map +1 -1
  226. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.d.cts +1 -6
  227. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.d.cts.map +1 -1
  228. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.d.ts +1 -6
  229. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.d.ts.map +1 -1
  230. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.js +1 -18
  231. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.js.map +1 -1
  232. package/dist/instrumentations/replay/createSessionRecordingControlFromReplay.d.cts +1 -1
  233. package/dist/instrumentations/replay/createSessionRecordingControlFromReplay.d.ts +1 -1
  234. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.cjs +6 -0
  235. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.d.cts +3 -0
  236. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.d.ts +3 -0
  237. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.cjs +29 -0
  238. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.cjs.map +1 -0
  239. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.d.cts +11 -0
  240. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.d.cts.map +1 -0
  241. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.d.ts +11 -0
  242. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.d.ts.map +1 -0
  243. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.js +25 -0
  244. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.js.map +1 -0
  245. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.cjs +48 -0
  246. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.cjs.map +1 -0
  247. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.d.cts +10 -0
  248. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.d.cts.map +1 -0
  249. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.d.ts +10 -0
  250. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.d.ts.map +1 -0
  251. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.js +44 -0
  252. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.js.map +1 -0
  253. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.js +2 -0
  254. package/dist/instrumentations/replay/rrwebLoader/types.d.cts +17 -0
  255. package/dist/instrumentations/replay/rrwebLoader/types.d.cts.map +1 -0
  256. package/dist/instrumentations/replay/rrwebLoader/types.d.ts +17 -0
  257. package/dist/instrumentations/replay/rrwebLoader/types.d.ts.map +1 -0
  258. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.cjs.map +1 -1
  259. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.js.map +1 -1
  260. package/dist/instrumentations/session/types.d.cts.map +1 -1
  261. package/dist/instrumentations/session/types.d.ts.map +1 -1
  262. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.cjs +1 -1
  263. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.cjs.map +1 -1
  264. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.d.cts.map +1 -1
  265. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.d.ts.map +1 -1
  266. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.js +1 -1
  267. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.js.map +1 -1
  268. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.cjs +1 -1
  269. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.cjs.map +1 -1
  270. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.cts.map +1 -1
  271. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.ts.map +1 -1
  272. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.js +1 -1
  273. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.js.map +1 -1
  274. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.cts.map +1 -1
  275. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.ts.map +1 -1
  276. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.cjs.map +1 -1
  277. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.cts.map +1 -1
  278. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.ts.map +1 -1
  279. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.js.map +1 -1
  280. package/dist/managers/MXLConfigManager/constants.cjs.map +1 -1
  281. package/dist/managers/MXLConfigManager/constants.d.cts +1 -0
  282. package/dist/managers/MXLConfigManager/constants.d.cts.map +1 -1
  283. package/dist/managers/MXLConfigManager/constants.d.ts +1 -0
  284. package/dist/managers/MXLConfigManager/constants.d.ts.map +1 -1
  285. package/dist/managers/MXLConfigManager/constants.js.map +1 -1
  286. package/dist/managers/MXLConfigManager/types.d.cts.map +1 -1
  287. package/dist/managers/MXLConfigManager/types.d.ts.map +1 -1
  288. package/dist/managers/MXLLimitManager/MXLLimitManager.cjs.map +1 -1
  289. package/dist/managers/MXLLimitManager/MXLLimitManager.js.map +1 -1
  290. package/dist/managers/MXLLimitManager/types.d.cts.map +1 -1
  291. package/dist/managers/MXLLimitManager/types.d.ts.map +1 -1
  292. package/dist/managers/MXLLogManager/MXLLogManager.cjs +4 -4
  293. package/dist/managers/MXLLogManager/MXLLogManager.cjs.map +1 -1
  294. package/dist/managers/MXLLogManager/MXLLogManager.d.cts.map +1 -1
  295. package/dist/managers/MXLLogManager/MXLLogManager.d.ts.map +1 -1
  296. package/dist/managers/MXLLogManager/MXLLogManager.js +4 -4
  297. package/dist/managers/MXLLogManager/MXLLogManager.js.map +1 -1
  298. package/dist/managers/MXLLogManager/types.d.cts +1 -1
  299. package/dist/managers/MXLLogManager/types.d.cts.map +1 -1
  300. package/dist/managers/MXLLogManager/types.d.ts +1 -1
  301. package/dist/managers/MXLLogManager/types.d.ts.map +1 -1
  302. package/dist/managers/MXLPageManager/MXLPageManager.cjs.map +1 -1
  303. package/dist/managers/MXLPageManager/MXLPageManager.js.map +1 -1
  304. package/dist/managers/MXLPageManager/types.d.cts.map +1 -1
  305. package/dist/managers/MXLPageManager/types.d.ts.map +1 -1
  306. package/dist/managers/MXLSDKFeaturesManager/MXLSDKFeaturesManager.cjs.map +1 -1
  307. package/dist/managers/MXLSDKFeaturesManager/MXLSDKFeaturesManager.js.map +1 -1
  308. package/dist/managers/MXLSDKFeaturesManager/types.d.cts +1 -0
  309. package/dist/managers/MXLSDKFeaturesManager/types.d.cts.map +1 -1
  310. package/dist/managers/MXLSDKFeaturesManager/types.d.ts +1 -0
  311. package/dist/managers/MXLSDKFeaturesManager/types.d.ts.map +1 -1
  312. package/dist/managers/MXLTraceManager/MXLExtendedSpan.cjs.map +1 -1
  313. package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.cts.map +1 -1
  314. package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.ts.map +1 -1
  315. package/dist/managers/MXLTraceManager/MXLExtendedSpan.js.map +1 -1
  316. package/dist/managers/MXLTraceManager/MXLTraceManager.cjs.map +1 -1
  317. package/dist/managers/MXLTraceManager/MXLTraceManager.d.cts.map +1 -1
  318. package/dist/managers/MXLTraceManager/MXLTraceManager.d.ts.map +1 -1
  319. package/dist/managers/MXLTraceManager/MXLTraceManager.js.map +1 -1
  320. package/dist/managers/MXLUserManager/MXLUserManager.cjs +2 -2
  321. package/dist/managers/MXLUserManager/MXLUserManager.cjs.map +1 -1
  322. package/dist/managers/MXLUserManager/MXLUserManager.js +1 -1
  323. package/dist/managers/MXLUserManager/MXLUserManager.js.map +1 -1
  324. package/dist/managers/MXLUserManager/types.cjs +1 -1
  325. package/dist/managers/MXLUserManager/types.cjs.map +1 -1
  326. package/dist/managers/MXLUserManager/types.js +1 -1
  327. package/dist/managers/MXLUserManager/types.js.map +1 -1
  328. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.cjs +4 -4
  329. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.cjs.map +1 -1
  330. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.cts +1 -1
  331. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.cts.map +1 -1
  332. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.ts +1 -1
  333. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.ts.map +1 -1
  334. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.js +4 -4
  335. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.js.map +1 -1
  336. package/dist/managers/MXLUserSessionManager/types.d.cts +2 -2
  337. package/dist/managers/MXLUserSessionManager/types.d.cts.map +1 -1
  338. package/dist/managers/MXLUserSessionManager/types.d.ts +2 -2
  339. package/dist/managers/MXLUserSessionManager/types.d.ts.map +1 -1
  340. package/dist/managers/MXLUserSessionManager/utils/activity.cjs.map +1 -1
  341. package/dist/managers/MXLUserSessionManager/utils/activity.js.map +1 -1
  342. package/dist/managers/MXLUserSessionManager/utils/state.cjs +1 -1
  343. package/dist/managers/MXLUserSessionManager/utils/state.cjs.map +1 -1
  344. package/dist/managers/MXLUserSessionManager/utils/state.d.cts.map +1 -1
  345. package/dist/managers/MXLUserSessionManager/utils/state.d.ts.map +1 -1
  346. package/dist/managers/MXLUserSessionManager/utils/state.js +1 -1
  347. package/dist/managers/MXLUserSessionManager/utils/state.js.map +1 -1
  348. package/dist/managers/MXLUserSessionManager/utils/tabTracking.cjs +2 -2
  349. package/dist/managers/MXLUserSessionManager/utils/tabTracking.cjs.map +1 -1
  350. package/dist/managers/MXLUserSessionManager/utils/tabTracking.d.cts.map +1 -1
  351. package/dist/managers/MXLUserSessionManager/utils/tabTracking.d.ts.map +1 -1
  352. package/dist/managers/MXLUserSessionManager/utils/tabTracking.js +2 -2
  353. package/dist/managers/MXLUserSessionManager/utils/tabTracking.js.map +1 -1
  354. package/dist/mxl-web-sdk.js +1 -1
  355. package/dist/mxl-web-sdk.js.map +1 -1
  356. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js +54 -0
  357. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js.map +1 -0
  358. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js +32 -0
  359. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js.map +1 -0
  360. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js +66 -0
  361. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js.map +1 -0
  362. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/json/logs.js +24 -0
  363. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/json/logs.js.map +1 -0
  364. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js +115 -0
  365. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js.map +1 -0
  366. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js +24 -0
  367. package/dist/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js.map +1 -0
  368. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/hex-to-binary.cjs +31 -0
  369. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/hex-to-binary.cjs.map +1 -0
  370. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.cjs +69 -0
  371. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.cjs.map +1 -0
  372. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/common-serializer.cjs +170 -0
  373. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/common-serializer.cjs.map +1 -0
  374. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-reader.cjs +108 -0
  375. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-reader.cjs.map +1 -0
  376. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-size-estimator.cjs +82 -0
  377. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-size-estimator.cjs.map +1 -0
  378. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-writer.cjs +240 -0
  379. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-writer.cjs.map +1 -0
  380. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/utils.cjs +33 -0
  381. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/utils.cjs.map +1 -0
  382. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/utils.cjs +72 -0
  383. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/common/utils.cjs.map +1 -0
  384. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/i-serializer.d.cts +19 -0
  385. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/i-serializer.d.cts.map +1 -0
  386. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/i-serializer.d.ts +19 -0
  387. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/i-serializer.d.ts.map +1 -0
  388. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/index.cjs +64 -0
  389. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/index.cjs.map +1 -0
  390. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/index.d.cts +1 -0
  391. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/index.d.ts +1 -0
  392. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal.cjs +80 -0
  393. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal.cjs.map +1 -0
  394. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/index.cjs +24 -0
  395. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/index.cjs.map +1 -0
  396. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/index.d.cts +1 -0
  397. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/index.d.ts +1 -0
  398. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/logs.cjs +37 -0
  399. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/logs.cjs.map +1 -0
  400. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/logs.d.cts +1 -0
  401. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/logs.d.ts +1 -0
  402. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/index.cjs +24 -0
  403. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/index.cjs.map +1 -0
  404. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/index.d.cts +1 -0
  405. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/index.d.ts +1 -0
  406. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/logs-serializer.cjs +146 -0
  407. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/logs-serializer.cjs.map +1 -0
  408. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/logs.cjs +28 -0
  409. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/logs.cjs.map +1 -0
  410. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/logs.d.cts +1 -0
  411. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/logs.d.ts +1 -0
  412. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/response-deserializer.cjs +70 -0
  413. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/response-deserializer.cjs.map +1 -0
  414. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal-types.cjs +79 -0
  415. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal-types.cjs.map +1 -0
  416. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal.cjs +145 -0
  417. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal.cjs.map +1 -0
  418. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/json/index.cjs +24 -0
  419. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/json/index.cjs.map +1 -0
  420. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/json/index.d.cts +1 -0
  421. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/json/index.d.ts +1 -0
  422. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/json/metrics.cjs +37 -0
  423. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/json/metrics.cjs.map +1 -0
  424. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/json/metrics.d.cts +1 -0
  425. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/json/metrics.d.ts +1 -0
  426. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/index.cjs +24 -0
  427. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/index.cjs.map +1 -0
  428. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/index.d.cts +1 -0
  429. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/index.d.ts +1 -0
  430. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/metrics-serializer.cjs +366 -0
  431. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/metrics-serializer.cjs.map +1 -0
  432. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/metrics.cjs +28 -0
  433. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/metrics.cjs.map +1 -0
  434. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/metrics.d.cts +1 -0
  435. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/metrics.d.ts +1 -0
  436. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/response-deserializer.cjs +70 -0
  437. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/protobuf/response-deserializer.cjs.map +1 -0
  438. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.cjs +131 -0
  439. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.cjs.map +1 -0
  440. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/json/index.cjs +24 -0
  441. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/json/index.cjs.map +1 -0
  442. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/json/index.d.cts +1 -0
  443. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/json/index.d.ts +1 -0
  444. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/json/trace.cjs +37 -0
  445. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/json/trace.cjs.map +1 -0
  446. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/json/trace.d.cts +1 -0
  447. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/json/trace.d.ts +1 -0
  448. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/index.cjs +24 -0
  449. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/index.cjs.map +1 -0
  450. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/index.d.cts +1 -0
  451. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/index.d.ts +1 -0
  452. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/response-deserializer.cjs +70 -0
  453. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/response-deserializer.cjs.map +1 -0
  454. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/trace-serializer.cjs +253 -0
  455. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/trace-serializer.cjs.map +1 -0
  456. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/trace.cjs +28 -0
  457. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/trace.cjs.map +1 -0
  458. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/trace.d.cts +1 -0
  459. package/dist/node_modules/@opentelemetry/otlp-transformer/build/src/trace/protobuf/trace.d.ts +1 -0
  460. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/InstrumentDescriptor.cjs +51 -0
  461. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/InstrumentDescriptor.cjs.map +1 -0
  462. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/InstrumentDescriptor.d.cts +1 -0
  463. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/InstrumentDescriptor.d.ts +1 -0
  464. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/Instruments.cjs +129 -0
  465. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/Instruments.cjs.map +1 -0
  466. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/Meter.cjs +100 -0
  467. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/Meter.cjs.map +1 -0
  468. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.cjs +85 -0
  469. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.cjs.map +1 -0
  470. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.d.cts +2 -0
  471. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.d.ts +2 -0
  472. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/ObservableResult.cjs +83 -0
  473. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/ObservableResult.cjs.map +1 -0
  474. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Drop.cjs +27 -0
  475. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Drop.cjs.map +1 -0
  476. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Drop.d.cts +1 -0
  477. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Drop.d.ts +1 -0
  478. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/ExponentialHistogram.cjs +423 -0
  479. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/ExponentialHistogram.cjs.map +1 -0
  480. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/ExponentialHistogram.d.cts +1 -0
  481. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/ExponentialHistogram.d.ts +1 -0
  482. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Histogram.cjs +172 -0
  483. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Histogram.cjs.map +1 -0
  484. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Histogram.d.cts +1 -0
  485. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Histogram.d.ts +1 -0
  486. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/LastValue.cjs +84 -0
  487. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/LastValue.cjs.map +1 -0
  488. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/LastValue.d.cts +1 -0
  489. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/LastValue.d.ts +1 -0
  490. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Sum.cjs +94 -0
  491. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Sum.cjs.map +1 -0
  492. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Sum.d.cts +1 -0
  493. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Sum.d.ts +1 -0
  494. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/Buckets.cjs +246 -0
  495. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/Buckets.cjs.map +1 -0
  496. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ExponentMapping.cjs +74 -0
  497. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ExponentMapping.cjs.map +1 -0
  498. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/LogarithmMapping.cjs +83 -0
  499. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/LogarithmMapping.cjs.map +1 -0
  500. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/getMapping.cjs +40 -0
  501. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/getMapping.cjs.map +1 -0
  502. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ieee754.cjs +82 -0
  503. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ieee754.cjs.map +1 -0
  504. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/types.cjs +17 -0
  505. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/types.cjs.map +1 -0
  506. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/util.cjs +51 -0
  507. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/util.cjs.map +1 -0
  508. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/index.cjs +80 -0
  509. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/index.cjs.map +1 -0
  510. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/index.d.cts +1 -0
  511. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/index.d.ts +1 -0
  512. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/types.cjs +22 -0
  513. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/types.cjs.map +1 -0
  514. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/types.d.cts +1 -0
  515. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/types.d.ts +1 -0
  516. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationSelector.cjs +26 -0
  517. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationSelector.cjs.map +1 -0
  518. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationSelector.d.cts +1 -0
  519. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationSelector.d.ts +1 -0
  520. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationTemporality.cjs +19 -0
  521. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationTemporality.cjs.map +1 -0
  522. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/CardinalitySelector.d.cts +1 -0
  523. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/CardinalitySelector.d.ts +1 -0
  524. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/ConsoleMetricExporter.cjs +51 -0
  525. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/ConsoleMetricExporter.cjs.map +1 -0
  526. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/ConsoleMetricExporter.d.cts +1 -0
  527. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/ConsoleMetricExporter.d.ts +1 -0
  528. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/InMemoryMetricExporter.cjs +61 -0
  529. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/InMemoryMetricExporter.cjs.map +1 -0
  530. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/InMemoryMetricExporter.d.cts +1 -0
  531. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/InMemoryMetricExporter.d.ts +1 -0
  532. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricData.cjs +48 -0
  533. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricData.cjs.map +1 -0
  534. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricData.d.cts +2 -0
  535. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricData.d.ts +2 -0
  536. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricExporter.d.cts +1 -0
  537. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricExporter.d.ts +1 -0
  538. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricProducer.d.cts +1 -0
  539. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricProducer.d.ts +1 -0
  540. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.cjs +92 -0
  541. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.cjs.map +1 -0
  542. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.d.cts +1 -0
  543. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.d.ts +1 -0
  544. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.cjs +109 -0
  545. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.cjs.map +1 -0
  546. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.d.cts +1 -0
  547. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.d.ts +1 -0
  548. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/index.cjs +108 -0
  549. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/index.cjs.map +1 -0
  550. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/index.d.cts +1 -0
  551. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/index.d.ts +1 -0
  552. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/AsyncMetricStorage.cjs +59 -0
  553. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/AsyncMetricStorage.cjs.map +1 -0
  554. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.cjs +88 -0
  555. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.cjs.map +1 -0
  556. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/HashMap.cjs +77 -0
  557. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/HashMap.cjs.map +1 -0
  558. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterProviderSharedState.cjs +51 -0
  559. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterProviderSharedState.cjs.map +1 -0
  560. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterSharedState.cjs +107 -0
  561. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterSharedState.cjs.map +1 -0
  562. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricCollector.cjs +73 -0
  563. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricCollector.cjs.map +1 -0
  564. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricStorage.cjs +41 -0
  565. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricStorage.cjs.map +1 -0
  566. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricStorageRegistry.cjs +81 -0
  567. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricStorageRegistry.cjs.map +1 -0
  568. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MultiWritableMetricStorage.cjs +29 -0
  569. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/MultiWritableMetricStorage.cjs.map +1 -0
  570. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/ObservableRegistry.cjs +108 -0
  571. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/ObservableRegistry.cjs.map +1 -0
  572. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/SyncMetricStorage.cjs +55 -0
  573. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/SyncMetricStorage.cjs.map +1 -0
  574. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/TemporalMetricProcessor.cjs +106 -0
  575. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/state/TemporalMetricProcessor.cjs.map +1 -0
  576. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/utils.cjs +100 -0
  577. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/utils.cjs.map +1 -0
  578. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/utils.d.cts +1 -0
  579. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/utils.d.ts +1 -0
  580. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/Aggregation.cjs +151 -0
  581. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/Aggregation.cjs.map +1 -0
  582. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/Aggregation.d.cts +1 -0
  583. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/Aggregation.d.ts +1 -0
  584. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/AggregationOption.cjs +46 -0
  585. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/AggregationOption.cjs.map +1 -0
  586. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/AggregationOption.d.cts +1 -0
  587. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/AggregationOption.d.ts +1 -0
  588. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.cjs +89 -0
  589. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.cjs.map +1 -0
  590. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.d.cts +1 -0
  591. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.d.ts +1 -0
  592. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/InstrumentSelector.cjs +38 -0
  593. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/InstrumentSelector.cjs.map +1 -0
  594. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/InstrumentSelector.d.cts +1 -0
  595. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/InstrumentSelector.d.ts +1 -0
  596. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/MeterSelector.cjs +41 -0
  597. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/MeterSelector.cjs.map +1 -0
  598. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/Predicate.cjs +53 -0
  599. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/Predicate.cjs.map +1 -0
  600. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/RegistrationConflicts.cjs +62 -0
  601. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/RegistrationConflicts.cjs.map +1 -0
  602. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/View.cjs +121 -0
  603. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/View.cjs.map +1 -0
  604. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/View.d.cts +1 -0
  605. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/View.d.ts +1 -0
  606. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/ViewRegistry.cjs +33 -0
  607. package/dist/node_modules/@opentelemetry/sdk-metrics/build/src/view/ViewRegistry.cjs.map +1 -0
  608. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.d.cts +1 -0
  609. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.d.ts +1 -0
  610. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/Sampler.d.cts +1 -0
  611. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/Sampler.d.ts +1 -0
  612. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.d.cts +2 -0
  613. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.d.ts +2 -0
  614. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/SpanProcessor.d.cts +1 -0
  615. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/SpanProcessor.d.ts +1 -0
  616. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/TimedEvent.d.cts +1 -0
  617. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/TimedEvent.d.ts +1 -0
  618. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/BatchSpanProcessorBase.d.cts +1 -0
  619. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/BatchSpanProcessorBase.d.ts +1 -0
  620. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/ConsoleSpanExporter.d.cts +1 -0
  621. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/ConsoleSpanExporter.d.ts +1 -0
  622. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/InMemorySpanExporter.d.cts +1 -0
  623. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/InMemorySpanExporter.d.ts +1 -0
  624. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/NoopSpanProcessor.d.cts +1 -0
  625. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/NoopSpanProcessor.d.ts +1 -0
  626. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/ReadableSpan.d.cts +2 -0
  627. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/ReadableSpan.d.ts +2 -0
  628. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/SimpleSpanProcessor.d.cts +1 -0
  629. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/SimpleSpanProcessor.d.ts +1 -0
  630. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/SpanExporter.d.cts +1 -0
  631. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/export/SpanExporter.d.ts +1 -0
  632. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/index.d.cts +1 -0
  633. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/index.d.ts +1 -0
  634. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/index.d.cts +1 -0
  635. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/index.d.ts +1 -0
  636. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/export/BatchSpanProcessor.d.cts +1 -0
  637. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/export/BatchSpanProcessor.d.ts +1 -0
  638. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/index.d.cts +1 -0
  639. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/index.d.ts +1 -0
  640. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOffSampler.d.cts +1 -0
  641. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOffSampler.d.ts +1 -0
  642. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOnSampler.d.cts +1 -0
  643. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOnSampler.d.ts +1 -0
  644. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/ParentBasedSampler.d.cts +1 -0
  645. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/ParentBasedSampler.d.ts +1 -0
  646. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/TraceIdRatioBasedSampler.d.cts +1 -0
  647. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/TraceIdRatioBasedSampler.d.ts +1 -0
  648. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/types.d.cts +2 -0
  649. package/dist/node_modules/@opentelemetry/sdk-trace-base/build/src/types.d.ts +2 -0
  650. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.cjs +93 -0
  651. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.cjs.map +1 -0
  652. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +88 -0
  653. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js.map +1 -0
  654. package/dist/node_modules/react-is/cjs/react-is.development.cjs +159 -0
  655. package/dist/node_modules/react-is/cjs/react-is.development.cjs.map +1 -0
  656. package/dist/node_modules/react-is/cjs/react-is.development.js +155 -0
  657. package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  658. package/dist/node_modules/react-is/cjs/react-is.production.min.cjs +103 -0
  659. package/dist/node_modules/react-is/cjs/react-is.production.min.cjs.map +1 -0
  660. package/dist/node_modules/react-is/index.cjs +18 -0
  661. package/dist/node_modules/react-is/index.cjs.map +1 -0
  662. package/dist/node_modules/react-is/index.js +11 -0
  663. package/dist/node_modules/react-is/index.js.map +1 -0
  664. package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.cjs.map +1 -1
  665. package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.js.map +1 -1
  666. package/dist/processors/BrowserLogRecordProcessor/types.d.cts.map +1 -1
  667. package/dist/processors/BrowserLogRecordProcessor/types.d.ts.map +1 -1
  668. package/dist/processors/BrowserSpanProcessor/BrowserSpanProcessor.cjs.map +1 -1
  669. package/dist/processors/BrowserSpanProcessor/BrowserSpanProcessor.js.map +1 -1
  670. package/dist/processors/BrowserSpanProcessor/types.d.cts.map +1 -1
  671. package/dist/processors/BrowserSpanProcessor/types.d.ts.map +1 -1
  672. package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.cjs.map +1 -1
  673. package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.js.map +1 -1
  674. package/dist/processors/LogRecordScrubProcessor/types.d.cts.map +1 -1
  675. package/dist/processors/LogRecordScrubProcessor/types.d.ts.map +1 -1
  676. package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.cjs.map +1 -1
  677. package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.js.map +1 -1
  678. package/dist/processors/MXLLogRecordProcessor/types.d.cts.map +1 -1
  679. package/dist/processors/MXLLogRecordProcessor/types.d.ts.map +1 -1
  680. package/dist/processors/MXLNetworkSpanProcessor/MXLNetworkSpanProcessor.cjs +5 -5
  681. package/dist/processors/MXLNetworkSpanProcessor/MXLNetworkSpanProcessor.cjs.map +1 -1
  682. package/dist/processors/MXLNetworkSpanProcessor/MXLNetworkSpanProcessor.d.cts.map +1 -1
  683. package/dist/processors/MXLNetworkSpanProcessor/MXLNetworkSpanProcessor.d.ts.map +1 -1
  684. package/dist/processors/MXLNetworkSpanProcessor/MXLNetworkSpanProcessor.js +5 -5
  685. package/dist/processors/MXLNetworkSpanProcessor/MXLNetworkSpanProcessor.js.map +1 -1
  686. package/dist/processors/MXLSessionPartBatchedSpanProcessor/MXLSessionPartBatchedSpanProcessor.cjs.map +1 -1
  687. package/dist/processors/MXLSessionPartBatchedSpanProcessor/MXLSessionPartBatchedSpanProcessor.d.cts.map +1 -1
  688. package/dist/processors/MXLSessionPartBatchedSpanProcessor/MXLSessionPartBatchedSpanProcessor.d.ts.map +1 -1
  689. package/dist/processors/MXLSessionPartBatchedSpanProcessor/MXLSessionPartBatchedSpanProcessor.js.map +1 -1
  690. package/dist/processors/MXLSessionPartBatchedSpanProcessor/types.d.cts.map +1 -1
  691. package/dist/processors/MXLSessionPartBatchedSpanProcessor/types.d.ts.map +1 -1
  692. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.cjs.map +1 -1
  693. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.cts.map +1 -1
  694. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.ts.map +1 -1
  695. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.js.map +1 -1
  696. package/dist/processors/PageLogRecordProcessor/types.d.cts.map +1 -1
  697. package/dist/processors/PageLogRecordProcessor/types.d.ts.map +1 -1
  698. package/dist/processors/PageSpanProcessor/PageSpanProcessor.cjs.map +1 -1
  699. package/dist/processors/PageSpanProcessor/PageSpanProcessor.d.cts.map +1 -1
  700. package/dist/processors/PageSpanProcessor/PageSpanProcessor.d.ts.map +1 -1
  701. package/dist/processors/PageSpanProcessor/PageSpanProcessor.js.map +1 -1
  702. package/dist/processors/PageSpanProcessor/types.d.cts.map +1 -1
  703. package/dist/processors/PageSpanProcessor/types.d.ts.map +1 -1
  704. package/dist/processors/SpanScrubProcessor/SpanScrubProcessor.cjs.map +1 -1
  705. package/dist/processors/SpanScrubProcessor/SpanScrubProcessor.js.map +1 -1
  706. package/dist/processors/SpanScrubProcessor/types.d.cts.map +1 -1
  707. package/dist/processors/SpanScrubProcessor/types.d.ts.map +1 -1
  708. package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.cjs.map +1 -1
  709. package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.js.map +1 -1
  710. package/dist/processors/UserLogRecordProcessor/types.d.cts.map +1 -1
  711. package/dist/processors/UserLogRecordProcessor/types.d.ts.map +1 -1
  712. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.cjs +1 -1
  713. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.cjs.map +1 -1
  714. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.cts.map +1 -1
  715. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.ts.map +1 -1
  716. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.js +1 -1
  717. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.js.map +1 -1
  718. package/dist/processors/UserSessionLogRecordProcessor/types.d.cts +1 -0
  719. package/dist/processors/UserSessionLogRecordProcessor/types.d.cts.map +1 -1
  720. package/dist/processors/UserSessionLogRecordProcessor/types.d.ts +1 -0
  721. package/dist/processors/UserSessionLogRecordProcessor/types.d.ts.map +1 -1
  722. package/dist/processors/UserSpanProcessor/UserSpanProcessor.cjs.map +1 -1
  723. package/dist/processors/UserSpanProcessor/UserSpanProcessor.js.map +1 -1
  724. package/dist/processors/UserSpanProcessor/types.d.cts.map +1 -1
  725. package/dist/processors/UserSpanProcessor/types.d.ts.map +1 -1
  726. package/dist/propagators/MXLW3CTraceContextPropagator/MXLW3CTraceContextPropagator.cjs.map +1 -1
  727. package/dist/propagators/MXLW3CTraceContextPropagator/MXLW3CTraceContextPropagator.d.cts.map +1 -1
  728. package/dist/propagators/MXLW3CTraceContextPropagator/MXLW3CTraceContextPropagator.d.ts.map +1 -1
  729. package/dist/propagators/MXLW3CTraceContextPropagator/MXLW3CTraceContextPropagator.js.map +1 -1
  730. package/dist/react-instrumentation/error-boundary.cjs +3 -0
  731. package/dist/react-instrumentation/error-boundary.d.cts +2 -0
  732. package/dist/react-instrumentation/error-boundary.d.ts +2 -0
  733. package/dist/react-instrumentation/error-boundary.js +2 -0
  734. package/dist/react-instrumentation/index.cjs +1 -1
  735. package/dist/react-instrumentation/index.js +1 -1
  736. package/dist/react-instrumentation/navigation.cjs +3 -0
  737. package/dist/react-instrumentation/navigation.d.cts +2 -0
  738. package/dist/react-instrumentation/navigation.d.ts +2 -0
  739. package/dist/react-instrumentation/navigation.js +2 -0
  740. package/dist/react-instrumentation/router-v5.cjs +3 -0
  741. package/dist/react-instrumentation/router-v5.d.cts +2 -0
  742. package/dist/react-instrumentation/router-v5.d.ts +2 -0
  743. package/dist/react-instrumentation/router-v5.js +2 -0
  744. package/dist/react-instrumentation/router-v6-data.cjs +3 -0
  745. package/dist/react-instrumentation/router-v6-data.d.cts +2 -0
  746. package/dist/react-instrumentation/router-v6-data.d.ts +2 -0
  747. package/dist/react-instrumentation/router-v6-data.js +2 -0
  748. package/dist/react-instrumentation/router-v6-declarative.cjs +3 -0
  749. package/dist/react-instrumentation/router-v6-declarative.d.cts +2 -0
  750. package/dist/react-instrumentation/router-v6-declarative.d.ts +2 -0
  751. package/dist/react-instrumentation/router-v6-declarative.js +2 -0
  752. package/dist/resources/appInstanceId.cjs +3 -3
  753. package/dist/resources/appInstanceId.cjs.map +1 -1
  754. package/dist/resources/appInstanceId.js +1 -1
  755. package/dist/resources/appInstanceId.js.map +1 -1
  756. package/dist/resources/sdkConstants.cjs +15 -0
  757. package/dist/resources/sdkConstants.cjs.map +1 -0
  758. package/dist/resources/sdkConstants.d.cts +9 -0
  759. package/dist/resources/sdkConstants.d.cts.map +1 -0
  760. package/dist/resources/sdkConstants.d.ts +9 -0
  761. package/dist/resources/sdkConstants.d.ts.map +1 -0
  762. package/dist/resources/sdkConstants.js +10 -0
  763. package/dist/resources/sdkConstants.js.map +1 -0
  764. package/dist/resources/webSdkResource.cjs +5 -5
  765. package/dist/resources/webSdkResource.cjs.map +1 -1
  766. package/dist/resources/webSdkResource.js +2 -2
  767. package/dist/resources/webSdkResource.js.map +1 -1
  768. package/dist/sdk/defaultAttributeScrubbers.cjs.map +1 -1
  769. package/dist/sdk/defaultAttributeScrubbers.d.cts.map +1 -1
  770. package/dist/sdk/defaultAttributeScrubbers.d.ts.map +1 -1
  771. package/dist/sdk/defaultAttributeScrubbers.js.map +1 -1
  772. package/dist/sdk/initSDK.cjs +9 -9
  773. package/dist/sdk/initSDK.cjs.map +1 -1
  774. package/dist/sdk/initSDK.d.cts.map +1 -1
  775. package/dist/sdk/initSDK.d.ts.map +1 -1
  776. package/dist/sdk/initSDK.js +9 -9
  777. package/dist/sdk/initSDK.js.map +1 -1
  778. package/dist/sdk/setupDefaultInstrumentations.cjs +3 -3
  779. package/dist/sdk/setupDefaultInstrumentations.cjs.map +1 -1
  780. package/dist/sdk/setupDefaultInstrumentations.d.cts.map +1 -1
  781. package/dist/sdk/setupDefaultInstrumentations.d.ts.map +1 -1
  782. package/dist/sdk/setupDefaultInstrumentations.js +3 -3
  783. package/dist/sdk/setupDefaultInstrumentations.js.map +1 -1
  784. package/dist/sdk/types.d.cts +9 -9
  785. package/dist/sdk/types.d.cts.map +1 -1
  786. package/dist/sdk/types.d.ts +8 -8
  787. package/dist/sdk/types.d.ts.map +1 -1
  788. package/dist/sdk/utils.cjs +2 -2
  789. package/dist/sdk/utils.cjs.map +1 -1
  790. package/dist/sdk/utils.js +1 -1
  791. package/dist/sdk/utils.js.map +1 -1
  792. package/dist/transport/RetryingTransport/RetryingTransport.cjs.map +1 -1
  793. package/dist/transport/RetryingTransport/RetryingTransport.js.map +1 -1
  794. package/dist/transport/RetryingTransport/createRetryingTransport.cjs.map +1 -1
  795. package/dist/transport/RetryingTransport/createRetryingTransport.d.cts.map +1 -1
  796. package/dist/transport/RetryingTransport/createRetryingTransport.d.ts.map +1 -1
  797. package/dist/transport/RetryingTransport/createRetryingTransport.js.map +1 -1
  798. package/dist/utils/getVisibilityState.cjs.map +1 -1
  799. package/dist/utils/getVisibilityState.d.cts.map +1 -1
  800. package/dist/utils/getVisibilityState.d.ts.map +1 -1
  801. package/dist/utils/getVisibilityState.js.map +1 -1
  802. package/dist/utils/nsfConfigValidation.cjs.map +1 -1
  803. package/dist/utils/nsfConfigValidation.d.cts.map +1 -1
  804. package/dist/utils/nsfConfigValidation.d.ts.map +1 -1
  805. package/dist/utils/nsfConfigValidation.js.map +1 -1
  806. package/package.json +37 -3
  807. package/dist/api-logs/api/LogAPI/index.cjs +0 -3
  808. package/dist/api-logs/api/LogAPI/index.d.cts +0 -2
  809. package/dist/api-logs/api/LogAPI/index.d.ts +0 -2
  810. package/dist/api-logs/api/LogAPI/index.js +0 -2
  811. package/dist/api-logs/api/index.cjs +0 -3
  812. package/dist/api-logs/api/index.d.cts +0 -2
  813. package/dist/api-logs/api/index.d.ts +0 -2
  814. package/dist/api-logs/api/index.js +0 -2
  815. package/dist/api-logs/index.cjs +0 -7
  816. package/dist/api-logs/index.d.cts +0 -5
  817. package/dist/api-logs/index.d.ts +0 -5
  818. package/dist/api-logs/index.js +0 -4
  819. package/dist/api-logs/manager/NoOpLogManager/index.cjs +0 -3
  820. package/dist/api-logs/manager/NoOpLogManager/index.d.cts +0 -2
  821. package/dist/api-logs/manager/NoOpLogManager/index.d.ts +0 -2
  822. package/dist/api-logs/manager/NoOpLogManager/index.js +0 -2
  823. package/dist/api-logs/manager/ProxyLogManager/index.cjs +0 -3
  824. package/dist/api-logs/manager/ProxyLogManager/index.d.cts +0 -2
  825. package/dist/api-logs/manager/ProxyLogManager/index.d.ts +0 -2
  826. package/dist/api-logs/manager/ProxyLogManager/index.js +0 -2
  827. package/dist/api-logs/manager/index.cjs +0 -5
  828. package/dist/api-logs/manager/index.d.cts +0 -4
  829. package/dist/api-logs/manager/index.d.ts +0 -4
  830. package/dist/api-logs/manager/index.js +0 -3
  831. package/dist/api-page/api/PageAPI/index.cjs +0 -3
  832. package/dist/api-page/api/PageAPI/index.d.cts +0 -3
  833. package/dist/api-page/api/PageAPI/index.d.ts +0 -3
  834. package/dist/api-page/api/PageAPI/index.js +0 -2
  835. package/dist/api-page/api/index.cjs +0 -3
  836. package/dist/api-page/api/index.d.cts +0 -3
  837. package/dist/api-page/api/index.d.ts +0 -3
  838. package/dist/api-page/api/index.js +0 -2
  839. package/dist/api-page/index.cjs +0 -7
  840. package/dist/api-page/index.d.cts +0 -5
  841. package/dist/api-page/index.d.ts +0 -5
  842. package/dist/api-page/index.js +0 -4
  843. package/dist/api-page/manager/NoOpPageManager/index.cjs +0 -3
  844. package/dist/api-page/manager/NoOpPageManager/index.d.cts +0 -2
  845. package/dist/api-page/manager/NoOpPageManager/index.d.ts +0 -2
  846. package/dist/api-page/manager/NoOpPageManager/index.js +0 -2
  847. package/dist/api-page/manager/ProxyPageManager/index.cjs +0 -3
  848. package/dist/api-page/manager/ProxyPageManager/index.d.cts +0 -2
  849. package/dist/api-page/manager/ProxyPageManager/index.d.ts +0 -2
  850. package/dist/api-page/manager/ProxyPageManager/index.js +0 -2
  851. package/dist/api-page/manager/index.cjs +0 -5
  852. package/dist/api-page/manager/index.d.cts +0 -4
  853. package/dist/api-page/manager/index.d.ts +0 -4
  854. package/dist/api-page/manager/index.js +0 -3
  855. package/dist/api-sessions/api/SessionAPI/index.cjs +0 -3
  856. package/dist/api-sessions/api/SessionAPI/index.d.cts +0 -2
  857. package/dist/api-sessions/api/SessionAPI/index.d.ts +0 -2
  858. package/dist/api-sessions/api/SessionAPI/index.js +0 -2
  859. package/dist/api-sessions/api/index.cjs +0 -3
  860. package/dist/api-sessions/api/index.d.cts +0 -2
  861. package/dist/api-sessions/api/index.d.ts +0 -2
  862. package/dist/api-sessions/api/index.js +0 -2
  863. package/dist/api-sessions/index.cjs +0 -7
  864. package/dist/api-sessions/index.d.cts +0 -5
  865. package/dist/api-sessions/index.d.ts +0 -5
  866. package/dist/api-sessions/index.js +0 -4
  867. package/dist/api-sessions/manager/NoOpUserSessionManager/index.cjs +0 -3
  868. package/dist/api-sessions/manager/NoOpUserSessionManager/index.d.cts +0 -2
  869. package/dist/api-sessions/manager/NoOpUserSessionManager/index.d.ts +0 -2
  870. package/dist/api-sessions/manager/NoOpUserSessionManager/index.js +0 -2
  871. package/dist/api-sessions/manager/ProxyUserSessionManager/index.cjs +0 -3
  872. package/dist/api-sessions/manager/ProxyUserSessionManager/index.d.cts +0 -2
  873. package/dist/api-sessions/manager/ProxyUserSessionManager/index.d.ts +0 -2
  874. package/dist/api-sessions/manager/ProxyUserSessionManager/index.js +0 -2
  875. package/dist/api-sessions/manager/index.cjs +0 -5
  876. package/dist/api-sessions/manager/index.d.cts +0 -4
  877. package/dist/api-sessions/manager/index.d.ts +0 -4
  878. package/dist/api-sessions/manager/index.js +0 -3
  879. package/dist/api-traces/api/TraceAPI/index.cjs +0 -3
  880. package/dist/api-traces/api/TraceAPI/index.d.cts +0 -3
  881. package/dist/api-traces/api/TraceAPI/index.d.ts +0 -3
  882. package/dist/api-traces/api/TraceAPI/index.js +0 -2
  883. package/dist/api-traces/api/index.cjs +0 -3
  884. package/dist/api-traces/api/index.d.cts +0 -3
  885. package/dist/api-traces/api/index.d.ts +0 -3
  886. package/dist/api-traces/api/index.js +0 -2
  887. package/dist/api-traces/index.cjs +0 -7
  888. package/dist/api-traces/index.d.cts +0 -6
  889. package/dist/api-traces/index.d.ts +0 -6
  890. package/dist/api-traces/index.js +0 -4
  891. package/dist/api-traces/manager/NoOpTraceManager/index.cjs +0 -3
  892. package/dist/api-traces/manager/NoOpTraceManager/index.d.cts +0 -2
  893. package/dist/api-traces/manager/NoOpTraceManager/index.d.ts +0 -2
  894. package/dist/api-traces/manager/NoOpTraceManager/index.js +0 -2
  895. package/dist/api-traces/manager/ProxyTraceManager/index.cjs +0 -3
  896. package/dist/api-traces/manager/ProxyTraceManager/index.d.cts +0 -2
  897. package/dist/api-traces/manager/ProxyTraceManager/index.d.ts +0 -2
  898. package/dist/api-traces/manager/ProxyTraceManager/index.js +0 -2
  899. package/dist/api-traces/manager/index.cjs +0 -5
  900. package/dist/api-traces/manager/index.d.cts +0 -4
  901. package/dist/api-traces/manager/index.d.ts +0 -4
  902. package/dist/api-traces/manager/index.js +0 -3
  903. package/dist/api-users/api/UserAPI/index.cjs +0 -3
  904. package/dist/api-users/api/UserAPI/index.d.cts +0 -2
  905. package/dist/api-users/api/UserAPI/index.d.ts +0 -2
  906. package/dist/api-users/api/UserAPI/index.js +0 -2
  907. package/dist/api-users/api/index.cjs +0 -3
  908. package/dist/api-users/api/index.d.cts +0 -2
  909. package/dist/api-users/api/index.d.ts +0 -2
  910. package/dist/api-users/api/index.js +0 -2
  911. package/dist/api-users/index.cjs +0 -9
  912. package/dist/api-users/index.d.cts +0 -6
  913. package/dist/api-users/index.d.ts +0 -6
  914. package/dist/api-users/index.js +0 -5
  915. package/dist/api-users/manager/NoOpUserManager/index.cjs +0 -3
  916. package/dist/api-users/manager/NoOpUserManager/index.d.cts +0 -2
  917. package/dist/api-users/manager/NoOpUserManager/index.d.ts +0 -2
  918. package/dist/api-users/manager/NoOpUserManager/index.js +0 -2
  919. package/dist/api-users/manager/ProxyUserManager/index.cjs +0 -3
  920. package/dist/api-users/manager/ProxyUserManager/index.d.cts +0 -2
  921. package/dist/api-users/manager/ProxyUserManager/index.d.ts +0 -2
  922. package/dist/api-users/manager/ProxyUserManager/index.js +0 -2
  923. package/dist/api-users/manager/constants/index.cjs +0 -7
  924. package/dist/api-users/manager/constants/index.cjs.map +0 -1
  925. package/dist/api-users/manager/constants/index.d.cts +0 -5
  926. package/dist/api-users/manager/constants/index.d.cts.map +0 -1
  927. package/dist/api-users/manager/constants/index.d.ts +0 -5
  928. package/dist/api-users/manager/constants/index.d.ts.map +0 -1
  929. package/dist/api-users/manager/constants/index.js +0 -6
  930. package/dist/api-users/manager/constants/index.js.map +0 -1
  931. package/dist/api-users/manager/index.cjs +0 -7
  932. package/dist/api-users/manager/index.d.cts +0 -5
  933. package/dist/api-users/manager/index.d.ts +0 -5
  934. package/dist/api-users/manager/index.js +0 -4
  935. package/dist/common/index.cjs +0 -3
  936. package/dist/common/index.d.cts +0 -3
  937. package/dist/common/index.d.ts +0 -3
  938. package/dist/common/index.js +0 -2
  939. package/dist/constants/index.cjs +0 -47
  940. package/dist/constants/index.d.cts +0 -2
  941. package/dist/constants/index.d.ts +0 -2
  942. package/dist/constants/index.js +0 -2
  943. package/dist/exporters/BaseFetchExporter/index.cjs +0 -3
  944. package/dist/exporters/BaseFetchExporter/index.d.cts +0 -2
  945. package/dist/exporters/BaseFetchExporter/index.d.ts +0 -2
  946. package/dist/exporters/BaseFetchExporter/index.js +0 -2
  947. package/dist/exporters/MXLLogExporter/index.cjs +0 -3
  948. package/dist/exporters/MXLLogExporter/index.d.cts +0 -2
  949. package/dist/exporters/MXLLogExporter/index.d.ts +0 -2
  950. package/dist/exporters/MXLLogExporter/index.js +0 -2
  951. package/dist/exporters/MXLTraceExporter/index.cjs +0 -3
  952. package/dist/exporters/MXLTraceExporter/index.d.cts +0 -2
  953. package/dist/exporters/MXLTraceExporter/index.d.ts +0 -2
  954. package/dist/exporters/MXLTraceExporter/index.js +0 -2
  955. package/dist/exporters/index.cjs +0 -12
  956. package/dist/exporters/index.d.cts +0 -7
  957. package/dist/exporters/index.d.ts +0 -7
  958. package/dist/exporters/index.js +0 -6
  959. package/dist/instrumentations/InstrumentationAbstract/index.cjs +0 -3
  960. package/dist/instrumentations/InstrumentationAbstract/index.d.cts +0 -2
  961. package/dist/instrumentations/InstrumentationAbstract/index.d.ts +0 -2
  962. package/dist/instrumentations/InstrumentationAbstract/index.js +0 -2
  963. package/dist/instrumentations/MXLInstrumentationBase/index.cjs +0 -3
  964. package/dist/instrumentations/MXLInstrumentationBase/index.d.cts +0 -3
  965. package/dist/instrumentations/MXLInstrumentationBase/index.d.ts +0 -3
  966. package/dist/instrumentations/MXLInstrumentationBase/index.js +0 -2
  967. package/dist/instrumentations/clicks/ClicksInstrumentation/index.cjs +0 -3
  968. package/dist/instrumentations/clicks/ClicksInstrumentation/index.d.cts +0 -2
  969. package/dist/instrumentations/clicks/ClicksInstrumentation/index.d.ts +0 -2
  970. package/dist/instrumentations/clicks/ClicksInstrumentation/index.js +0 -2
  971. package/dist/instrumentations/clicks/index.cjs +0 -3
  972. package/dist/instrumentations/clicks/index.d.cts +0 -3
  973. package/dist/instrumentations/clicks/index.d.ts +0 -3
  974. package/dist/instrumentations/clicks/index.js +0 -2
  975. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/index.cjs +0 -5
  976. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/index.d.cts +0 -4
  977. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/index.d.ts +0 -4
  978. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/index.js +0 -3
  979. package/dist/instrumentations/document-load/index.cjs +0 -5
  980. package/dist/instrumentations/document-load/index.d.cts +0 -4
  981. package/dist/instrumentations/document-load/index.d.ts +0 -4
  982. package/dist/instrumentations/document-load/index.js +0 -3
  983. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/index.cjs +0 -3
  984. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/index.d.cts +0 -3
  985. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/index.d.ts +0 -3
  986. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/index.js +0 -2
  987. package/dist/instrumentations/element-timing/index.cjs +0 -3
  988. package/dist/instrumentations/element-timing/index.d.cts +0 -3
  989. package/dist/instrumentations/element-timing/index.d.ts +0 -3
  990. package/dist/instrumentations/element-timing/index.js +0 -2
  991. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/index.cjs +0 -3
  992. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/index.d.cts +0 -2
  993. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/index.d.ts +0 -2
  994. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/index.js +0 -2
  995. package/dist/instrumentations/empty-root/index.cjs +0 -3
  996. package/dist/instrumentations/empty-root/index.d.cts +0 -3
  997. package/dist/instrumentations/empty-root/index.d.ts +0 -3
  998. package/dist/instrumentations/empty-root/index.js +0 -2
  999. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/index.cjs +0 -3
  1000. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/index.d.cts +0 -2
  1001. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/index.d.ts +0 -2
  1002. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/index.js +0 -2
  1003. package/dist/instrumentations/exceptions/index.cjs +0 -3
  1004. package/dist/instrumentations/exceptions/index.d.cts +0 -3
  1005. package/dist/instrumentations/exceptions/index.d.ts +0 -3
  1006. package/dist/instrumentations/exceptions/index.js +0 -2
  1007. package/dist/instrumentations/exceptions/react/MXLErrorBoundary/index.cjs +0 -3
  1008. package/dist/instrumentations/exceptions/react/MXLErrorBoundary/index.d.cts +0 -2
  1009. package/dist/instrumentations/exceptions/react/MXLErrorBoundary/index.d.ts +0 -2
  1010. package/dist/instrumentations/exceptions/react/MXLErrorBoundary/index.js +0 -2
  1011. package/dist/instrumentations/index.cjs +0 -25
  1012. package/dist/instrumentations/index.d.cts +0 -24
  1013. package/dist/instrumentations/index.d.ts +0 -24
  1014. package/dist/instrumentations/index.js +0 -13
  1015. package/dist/instrumentations/loaf/LoafInstrumentation/index.cjs +0 -3
  1016. package/dist/instrumentations/loaf/LoafInstrumentation/index.d.cts +0 -3
  1017. package/dist/instrumentations/loaf/LoafInstrumentation/index.d.ts +0 -3
  1018. package/dist/instrumentations/loaf/LoafInstrumentation/index.js +0 -2
  1019. package/dist/instrumentations/loaf/index.cjs +0 -3
  1020. package/dist/instrumentations/loaf/index.d.cts +0 -3
  1021. package/dist/instrumentations/loaf/index.d.ts +0 -3
  1022. package/dist/instrumentations/loaf/index.js +0 -2
  1023. package/dist/instrumentations/navigation/NavigationInstrumentation/index.cjs +0 -5
  1024. package/dist/instrumentations/navigation/NavigationInstrumentation/index.d.cts +0 -4
  1025. package/dist/instrumentations/navigation/NavigationInstrumentation/index.d.ts +0 -4
  1026. package/dist/instrumentations/navigation/NavigationInstrumentation/index.js +0 -3
  1027. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/index.cjs +0 -3
  1028. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/index.d.cts +0 -2
  1029. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/index.d.ts +0 -2
  1030. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/index.js +0 -2
  1031. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/index.cjs +0 -3
  1032. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/index.d.cts +0 -2
  1033. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/index.d.ts +0 -2
  1034. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/index.js +0 -2
  1035. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/index.cjs +0 -3
  1036. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/index.d.cts +0 -2
  1037. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/index.d.ts +0 -2
  1038. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/index.js +0 -2
  1039. package/dist/instrumentations/navigation/index.cjs +0 -5
  1040. package/dist/instrumentations/navigation/index.d.cts +0 -3
  1041. package/dist/instrumentations/navigation/index.d.ts +0 -3
  1042. package/dist/instrumentations/navigation/index.js +0 -3
  1043. package/dist/instrumentations/replay/ReplayInstrumentation/index.cjs +0 -3
  1044. package/dist/instrumentations/replay/ReplayInstrumentation/index.d.cts +0 -3
  1045. package/dist/instrumentations/replay/ReplayInstrumentation/index.d.ts +0 -3
  1046. package/dist/instrumentations/replay/ReplayInstrumentation/index.js +0 -2
  1047. package/dist/instrumentations/replay/index.cjs +0 -8
  1048. package/dist/instrumentations/replay/index.d.cts +0 -4
  1049. package/dist/instrumentations/replay/index.d.ts +0 -4
  1050. package/dist/instrumentations/replay/index.js +0 -3
  1051. package/dist/instrumentations/replay/utils/index.cjs +0 -5
  1052. package/dist/instrumentations/replay/utils/index.d.cts +0 -2
  1053. package/dist/instrumentations/replay/utils/index.d.ts +0 -2
  1054. package/dist/instrumentations/replay/utils/index.js +0 -2
  1055. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/index.cjs +0 -3
  1056. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/index.d.cts +0 -3
  1057. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/index.d.ts +0 -3
  1058. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/index.js +0 -2
  1059. package/dist/instrumentations/server-timing/index.cjs +0 -3
  1060. package/dist/instrumentations/server-timing/index.d.cts +0 -3
  1061. package/dist/instrumentations/server-timing/index.d.ts +0 -3
  1062. package/dist/instrumentations/server-timing/index.js +0 -2
  1063. package/dist/instrumentations/session/index.cjs +0 -3
  1064. package/dist/instrumentations/session/index.d.cts +0 -4
  1065. package/dist/instrumentations/session/index.d.ts +0 -4
  1066. package/dist/instrumentations/session/index.js +0 -2
  1067. package/dist/instrumentations/user-timing/UserTimingInstrumentation/index.cjs +0 -3
  1068. package/dist/instrumentations/user-timing/UserTimingInstrumentation/index.d.cts +0 -3
  1069. package/dist/instrumentations/user-timing/UserTimingInstrumentation/index.d.ts +0 -3
  1070. package/dist/instrumentations/user-timing/UserTimingInstrumentation/index.js +0 -2
  1071. package/dist/instrumentations/user-timing/index.cjs +0 -3
  1072. package/dist/instrumentations/user-timing/index.d.cts +0 -3
  1073. package/dist/instrumentations/user-timing/index.d.ts +0 -3
  1074. package/dist/instrumentations/user-timing/index.js +0 -2
  1075. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/index.cjs +0 -3
  1076. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/index.d.cts +0 -3
  1077. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/index.d.ts +0 -3
  1078. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/index.js +0 -2
  1079. package/dist/instrumentations/web-vitals/index.cjs +0 -3
  1080. package/dist/instrumentations/web-vitals/index.d.cts +0 -3
  1081. package/dist/instrumentations/web-vitals/index.d.ts +0 -3
  1082. package/dist/instrumentations/web-vitals/index.js +0 -2
  1083. package/dist/managers/MXLConfigManager/index.cjs +0 -3
  1084. package/dist/managers/MXLConfigManager/index.d.cts +0 -2
  1085. package/dist/managers/MXLConfigManager/index.d.ts +0 -2
  1086. package/dist/managers/MXLConfigManager/index.js +0 -2
  1087. package/dist/managers/MXLLimitManager/index.cjs +0 -6
  1088. package/dist/managers/MXLLimitManager/index.d.cts +0 -4
  1089. package/dist/managers/MXLLimitManager/index.d.ts +0 -4
  1090. package/dist/managers/MXLLimitManager/index.js +0 -3
  1091. package/dist/managers/MXLLogManager/index.cjs +0 -3
  1092. package/dist/managers/MXLLogManager/index.d.cts +0 -2
  1093. package/dist/managers/MXLLogManager/index.d.ts +0 -2
  1094. package/dist/managers/MXLLogManager/index.js +0 -2
  1095. package/dist/managers/MXLPageManager/index.cjs +0 -3
  1096. package/dist/managers/MXLPageManager/index.d.cts +0 -3
  1097. package/dist/managers/MXLPageManager/index.d.ts +0 -3
  1098. package/dist/managers/MXLPageManager/index.js +0 -2
  1099. package/dist/managers/MXLSDKFeaturesManager/index.cjs +0 -3
  1100. package/dist/managers/MXLSDKFeaturesManager/index.d.cts +0 -3
  1101. package/dist/managers/MXLSDKFeaturesManager/index.d.ts +0 -3
  1102. package/dist/managers/MXLSDKFeaturesManager/index.js +0 -2
  1103. package/dist/managers/MXLTraceManager/index.cjs +0 -5
  1104. package/dist/managers/MXLTraceManager/index.d.cts +0 -3
  1105. package/dist/managers/MXLTraceManager/index.d.ts +0 -3
  1106. package/dist/managers/MXLTraceManager/index.js +0 -3
  1107. package/dist/managers/MXLUserManager/index.cjs +0 -3
  1108. package/dist/managers/MXLUserManager/index.d.cts +0 -2
  1109. package/dist/managers/MXLUserManager/index.d.ts +0 -2
  1110. package/dist/managers/MXLUserManager/index.js +0 -2
  1111. package/dist/managers/MXLUserSessionManager/index.cjs +0 -6
  1112. package/dist/managers/MXLUserSessionManager/index.d.cts +0 -4
  1113. package/dist/managers/MXLUserSessionManager/index.d.ts +0 -4
  1114. package/dist/managers/MXLUserSessionManager/index.js +0 -3
  1115. package/dist/managers/MXLUserSessionManager/utils/index.cjs +0 -11
  1116. package/dist/managers/MXLUserSessionManager/utils/index.d.cts +0 -3
  1117. package/dist/managers/MXLUserSessionManager/utils/index.d.ts +0 -3
  1118. package/dist/managers/MXLUserSessionManager/utils/index.js +0 -3
  1119. package/dist/managers/index.cjs +0 -25
  1120. package/dist/managers/index.d.cts +0 -16
  1121. package/dist/managers/index.d.ts +0 -16
  1122. package/dist/managers/index.js +0 -12
  1123. package/dist/packages/otlp-transformer/dist/index.cjs +0 -533
  1124. package/dist/packages/otlp-transformer/dist/index.cjs.map +0 -1
  1125. package/dist/packages/otlp-transformer/dist/index.d.cts +0 -26
  1126. package/dist/packages/otlp-transformer/dist/index.d.cts.map +0 -1
  1127. package/dist/packages/otlp-transformer/dist/index.d.ts +0 -26
  1128. package/dist/packages/otlp-transformer/dist/index.d.ts.map +0 -1
  1129. package/dist/packages/otlp-transformer/dist/index.js +0 -532
  1130. package/dist/packages/otlp-transformer/dist/index.js.map +0 -1
  1131. package/dist/processors/BrowserLogRecordProcessor/index.cjs +0 -3
  1132. package/dist/processors/BrowserLogRecordProcessor/index.d.cts +0 -2
  1133. package/dist/processors/BrowserLogRecordProcessor/index.d.ts +0 -2
  1134. package/dist/processors/BrowserLogRecordProcessor/index.js +0 -2
  1135. package/dist/processors/BrowserSpanProcessor/index.cjs +0 -3
  1136. package/dist/processors/BrowserSpanProcessor/index.d.cts +0 -2
  1137. package/dist/processors/BrowserSpanProcessor/index.d.ts +0 -2
  1138. package/dist/processors/BrowserSpanProcessor/index.js +0 -2
  1139. package/dist/processors/LogRecordScrubProcessor/index.cjs +0 -3
  1140. package/dist/processors/LogRecordScrubProcessor/index.d.cts +0 -2
  1141. package/dist/processors/LogRecordScrubProcessor/index.d.ts +0 -2
  1142. package/dist/processors/LogRecordScrubProcessor/index.js +0 -2
  1143. package/dist/processors/MXLLogRecordProcessor/index.cjs +0 -3
  1144. package/dist/processors/MXLLogRecordProcessor/index.d.cts +0 -2
  1145. package/dist/processors/MXLLogRecordProcessor/index.d.ts +0 -2
  1146. package/dist/processors/MXLLogRecordProcessor/index.js +0 -2
  1147. package/dist/processors/MXLNetworkSpanProcessor/index.cjs +0 -3
  1148. package/dist/processors/MXLNetworkSpanProcessor/index.d.cts +0 -2
  1149. package/dist/processors/MXLNetworkSpanProcessor/index.d.ts +0 -2
  1150. package/dist/processors/MXLNetworkSpanProcessor/index.js +0 -2
  1151. package/dist/processors/MXLSessionPartBatchedSpanProcessor/index.cjs +0 -3
  1152. package/dist/processors/MXLSessionPartBatchedSpanProcessor/index.d.cts +0 -3
  1153. package/dist/processors/MXLSessionPartBatchedSpanProcessor/index.d.ts +0 -3
  1154. package/dist/processors/MXLSessionPartBatchedSpanProcessor/index.js +0 -2
  1155. package/dist/processors/PageLogRecordProcessor/index.cjs +0 -3
  1156. package/dist/processors/PageLogRecordProcessor/index.d.cts +0 -2
  1157. package/dist/processors/PageLogRecordProcessor/index.d.ts +0 -2
  1158. package/dist/processors/PageLogRecordProcessor/index.js +0 -2
  1159. package/dist/processors/PageSpanProcessor/index.cjs +0 -3
  1160. package/dist/processors/PageSpanProcessor/index.d.cts +0 -2
  1161. package/dist/processors/PageSpanProcessor/index.d.ts +0 -2
  1162. package/dist/processors/PageSpanProcessor/index.js +0 -2
  1163. package/dist/processors/SpanScrubProcessor/index.cjs +0 -3
  1164. package/dist/processors/SpanScrubProcessor/index.d.cts +0 -2
  1165. package/dist/processors/SpanScrubProcessor/index.d.ts +0 -2
  1166. package/dist/processors/SpanScrubProcessor/index.js +0 -2
  1167. package/dist/processors/UserLogRecordProcessor/index.cjs +0 -3
  1168. package/dist/processors/UserLogRecordProcessor/index.d.cts +0 -2
  1169. package/dist/processors/UserLogRecordProcessor/index.d.ts +0 -2
  1170. package/dist/processors/UserLogRecordProcessor/index.js +0 -2
  1171. package/dist/processors/UserSessionLogRecordProcessor/index.cjs +0 -3
  1172. package/dist/processors/UserSessionLogRecordProcessor/index.d.cts +0 -3
  1173. package/dist/processors/UserSessionLogRecordProcessor/index.d.ts +0 -3
  1174. package/dist/processors/UserSessionLogRecordProcessor/index.js +0 -2
  1175. package/dist/processors/UserSpanProcessor/index.cjs +0 -3
  1176. package/dist/processors/UserSpanProcessor/index.d.cts +0 -2
  1177. package/dist/processors/UserSpanProcessor/index.d.ts +0 -2
  1178. package/dist/processors/UserSpanProcessor/index.js +0 -2
  1179. package/dist/processors/index.cjs +0 -25
  1180. package/dist/processors/index.d.cts +0 -13
  1181. package/dist/processors/index.d.ts +0 -13
  1182. package/dist/processors/index.js +0 -13
  1183. package/dist/propagators/MXLW3CTraceContextPropagator/index.cjs +0 -3
  1184. package/dist/propagators/MXLW3CTraceContextPropagator/index.d.cts +0 -2
  1185. package/dist/propagators/MXLW3CTraceContextPropagator/index.d.ts +0 -2
  1186. package/dist/propagators/MXLW3CTraceContextPropagator/index.js +0 -2
  1187. package/dist/propagators/index.cjs +0 -3
  1188. package/dist/propagators/index.d.cts +0 -2
  1189. package/dist/propagators/index.d.ts +0 -2
  1190. package/dist/propagators/index.js +0 -2
  1191. package/dist/resources/constants/index.cjs +0 -15
  1192. package/dist/resources/constants/index.cjs.map +0 -1
  1193. package/dist/resources/constants/index.d.cts +0 -9
  1194. package/dist/resources/constants/index.d.cts.map +0 -1
  1195. package/dist/resources/constants/index.d.ts +0 -9
  1196. package/dist/resources/constants/index.d.ts.map +0 -1
  1197. package/dist/resources/constants/index.js +0 -10
  1198. package/dist/resources/constants/index.js.map +0 -1
  1199. package/dist/resources/index.cjs +0 -10
  1200. package/dist/resources/index.d.cts +0 -4
  1201. package/dist/resources/index.d.ts +0 -4
  1202. package/dist/resources/index.js +0 -4
  1203. package/dist/sdk/index.cjs +0 -3
  1204. package/dist/sdk/index.d.cts +0 -4
  1205. package/dist/sdk/index.d.ts +0 -4
  1206. package/dist/sdk/index.js +0 -2
  1207. package/dist/transport/FetchTransport/index.cjs +0 -3
  1208. package/dist/transport/FetchTransport/index.d.cts +0 -2
  1209. package/dist/transport/FetchTransport/index.d.ts +0 -2
  1210. package/dist/transport/FetchTransport/index.js +0 -2
  1211. package/dist/transport/RetryingTransport/index.cjs +0 -3
  1212. package/dist/transport/RetryingTransport/index.d.cts +0 -2
  1213. package/dist/transport/RetryingTransport/index.d.ts +0 -2
  1214. package/dist/transport/RetryingTransport/index.js +0 -2
  1215. package/dist/transport/index.cjs +0 -5
  1216. package/dist/transport/index.d.cts +0 -3
  1217. package/dist/transport/index.d.ts +0 -3
  1218. package/dist/transport/index.js +0 -3
  1219. package/dist/utils/NamespacedStorage/index.cjs +0 -3
  1220. package/dist/utils/NamespacedStorage/index.d.cts +0 -2
  1221. package/dist/utils/NamespacedStorage/index.d.ts +0 -2
  1222. package/dist/utils/NamespacedStorage/index.js +0 -2
  1223. package/dist/utils/PerformanceManager/index.cjs +0 -3
  1224. package/dist/utils/PerformanceManager/index.d.cts +0 -3
  1225. package/dist/utils/PerformanceManager/index.d.ts +0 -3
  1226. package/dist/utils/PerformanceManager/index.js +0 -2
  1227. package/dist/utils/bulkAddEventListener/index.cjs +0 -3
  1228. package/dist/utils/bulkAddEventListener/index.d.cts +0 -2
  1229. package/dist/utils/bulkAddEventListener/index.d.ts +0 -2
  1230. package/dist/utils/bulkAddEventListener/index.js +0 -2
  1231. package/dist/utils/bulkRemoveEventListener/index.cjs +0 -3
  1232. package/dist/utils/bulkRemoveEventListener/index.d.cts +0 -2
  1233. package/dist/utils/bulkRemoveEventListener/index.d.ts +0 -2
  1234. package/dist/utils/bulkRemoveEventListener/index.js +0 -2
  1235. package/dist/utils/createSafeProxy/index.cjs +0 -3
  1236. package/dist/utils/createSafeProxy/index.d.cts +0 -2
  1237. package/dist/utils/createSafeProxy/index.d.ts +0 -2
  1238. package/dist/utils/createSafeProxy/index.js +0 -2
  1239. package/dist/utils/index.cjs +0 -32
  1240. package/dist/utils/index.d.cts +0 -18
  1241. package/dist/utils/index.d.ts +0 -18
  1242. package/dist/utils/index.js +0 -16
  1243. package/dist/utils/performanceObserver/index.cjs +0 -4
  1244. package/dist/utils/performanceObserver/index.d.cts +0 -2
  1245. package/dist/utils/performanceObserver/index.d.ts +0 -2
  1246. package/dist/utils/performanceObserver/index.js +0 -2
  1247. package/dist/utils/timeout/index.d.cts +0 -2
  1248. package/dist/utils/timeout/index.d.ts +0 -2
  1249. /package/dist/{utils/timeout/index.cjs → instrumentations/replay/rrwebLoader/types.cjs} +0 -0
  1250. /package/dist/{utils/timeout/index.js → instrumentations/replay/rrwebLoader/types.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"WebVitalsInstrumentation.cjs","names":["KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX","MAX_LOAF_SCRIPT_URL_LENGTH","MXLInstrumentationBase","WEB_VITALS_ID_TO_LISTENER","page","KEY_MXL_TYPE","ATTR_URL_FULL","KEY_BROWSER_URL_FULL","KEY_MXL_WEB_VITAL_NAVIGATION_TYPE","KEY_MXL_WEB_VITAL_NAME","KEY_MXL_WEB_VITAL_RATING","KEY_MXL_WEB_VITAL_ID","KEY_MXL_WEB_VITAL_DELTA","KEY_MXL_WEB_VITAL_VALUE","KEY_MXL_PAGE_PATH","KEY_MXL_PAGE_ID","KEY_APP_SURFACE_LABEL","MXL_WEB_VITALS_PREFIX"],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.ts"],"sourcesContent":["import type {\n AttributeValue,\n Attributes,\n DiagLogger,\n} from '@opentelemetry/api';\nimport { ATTR_URL_FULL } from '@opentelemetry/semantic-conventions';\nimport type {\n CLSMetricWithAttribution,\n INPAttribution,\n Metric,\n MetricWithAttribution,\n TTFBAttribution,\n} from 'web-vitals/attribution';\nimport type { PageManager } from '../../../api-page';\nimport { page } from '../../../api-page';\nimport type { URLDocument } from '../../../common';\nimport {\n KEY_APP_SURFACE_LABEL,\n KEY_BROWSER_URL_FULL,\n KEY_MXL_PAGE_ID,\n KEY_MXL_PAGE_PATH,\n KEY_MXL_TYPE,\n MXL_TYPES,\n} from '../../../constants';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase';\nimport {\n KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX,\n KEY_MXL_WEB_VITAL_DELTA,\n KEY_MXL_WEB_VITAL_ID,\n KEY_MXL_WEB_VITAL_NAME,\n KEY_MXL_WEB_VITAL_NAVIGATION_TYPE,\n KEY_MXL_WEB_VITAL_RATING,\n KEY_MXL_WEB_VITAL_VALUE,\n} from './attributes';\nimport {\n ALL_WEB_VITALS,\n MAX_LOAF_SCRIPT_ENTRIES,\n MAX_LOAF_SCRIPT_URL_LENGTH,\n MXL_WEB_VITALS_PREFIX,\n WEB_VITALS_ID_TO_LISTENER,\n} from './constants';\nimport type { WebVitalListeners, WebVitalsInstrumentationArgs } from './types';\n\ninterface AttributedPage {\n fullURL: string;\n path?: string;\n pageID?: string;\n label?: string;\n}\n\nconst isPrimitiveValue = (value: unknown): value is AttributeValue => {\n const type = typeof value;\n return type === 'number' || type === 'string' || type === 'boolean';\n};\n\nconst roundClamp = (value: number): number => Math.round(Math.max(0, value));\n\nconst webVitalAttributionToReport = (\n metric: MetricWithAttribution,\n): Attributes => {\n const attributes: Attributes = {};\n const { attribution } = metric;\n\n if (!attribution || typeof attribution !== 'object') {\n return attributes;\n }\n\n for (const [key, value] of Object.entries(attribution)) {\n if (isPrimitiveValue(value)) {\n attributes[`${KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX}${key}`] = value;\n }\n }\n\n return attributes;\n};\n\nconst loafScriptsAttribution = (\n metric: MetricWithAttribution,\n diag: DiagLogger,\n): Attributes => {\n const attributes: Attributes = {};\n const attribution = metric.attribution as INPAttribution;\n\n try {\n // Suppress LoAF baseline errors\n /* eslint-disable baseline-js/use-baseline */\n if (attribution.longAnimationFrameEntries.length > 0) {\n const scripts = new Map<\n string,\n {\n totalDuration: number;\n styleAndLayoutDuration: number;\n count: number;\n }\n >();\n for (const entry of attribution.longAnimationFrameEntries) {\n for (const script of entry.scripts) {\n let url = script.sourceURL || '(inline)';\n if (url.length > MAX_LOAF_SCRIPT_URL_LENGTH) {\n url = `${url.substring(0, MAX_LOAF_SCRIPT_URL_LENGTH)}...`;\n }\n const existing = scripts.get(url);\n if (existing) {\n existing.totalDuration += script.duration;\n existing.styleAndLayoutDuration +=\n script.forcedStyleAndLayoutDuration;\n existing.count++;\n } else {\n scripts.set(url, {\n count: 1,\n styleAndLayoutDuration: script.forcedStyleAndLayoutDuration,\n totalDuration: script.duration,\n });\n }\n }\n }\n if (scripts.size > 0) {\n attributes[`${KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX}loaf_scripts`] =\n JSON.stringify(\n Object.fromEntries(\n [...scripts]\n .sort((a, b) => b[1].totalDuration - a[1].totalDuration)\n .slice(0, MAX_LOAF_SCRIPT_ENTRIES)\n .map(([url, script]) => [\n url,\n {\n count: script.count,\n style_and_layout_duration: Math.round(\n script.styleAndLayoutDuration,\n ),\n total_duration: Math.round(script.totalDuration),\n },\n ]),\n ),\n );\n }\n }\n /* eslint-enable baseline-js/use-baseline */\n } catch (error) {\n diag.error('error building loaf scripts for INP', error);\n }\n\n return attributes;\n};\n\nconst ttfbSubPartsAttribution = (\n metric: MetricWithAttribution,\n diag: DiagLogger,\n): Attributes => {\n const attributes: Attributes = {};\n const attribution = metric.attribution as TTFBAttribution;\n const entry = attribution.navigationEntry as\n | PerformanceNavigationTiming\n | undefined;\n\n if (entry) {\n try {\n const redirect = roundClamp(entry.redirectEnd - entry.redirectStart);\n const domainLookup = roundClamp(\n entry.domainLookupEnd - entry.domainLookupStart,\n );\n const tcpConnection = roundClamp(\n entry.secureConnectionStart > 0\n ? entry.secureConnectionStart - entry.connectStart\n : entry.connectEnd - entry.connectStart,\n );\n const tlsNegotiation = roundClamp(\n entry.secureConnectionStart > 0\n ? entry.connectEnd - entry.secureConnectionStart\n : 0,\n );\n const effectiveResponseStart = Math.max(\n // @ts-expect-error 103 Early hints are not supported in all browsers\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart\n entry.finalResponseHeadersStart ?? 0,\n entry.responseStart,\n );\n const serverResponse = roundClamp(\n effectiveResponseStart - entry.requestStart,\n );\n const total = Math.round(entry.responseEnd - entry.startTime);\n const unattributed = roundClamp(\n total -\n redirect -\n domainLookup -\n tcpConnection -\n tlsNegotiation -\n serverResponse,\n );\n const prefix = KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX;\n attributes[`${prefix}redirect`] = redirect;\n attributes[`${prefix}domainLookup`] = domainLookup;\n attributes[`${prefix}tcpConnection`] = tcpConnection;\n attributes[`${prefix}tlsNegotiation`] = tlsNegotiation;\n attributes[`${prefix}serverResponse`] = serverResponse;\n attributes[`${prefix}unattributed`] = unattributed;\n } catch (error) {\n diag.error('error computing TTFB timing breakdown', error);\n }\n } else {\n diag.debug('TTFB navigationEntry unavailable, skipping timing breakdown');\n }\n\n return attributes;\n};\n\nexport class WebVitalsInstrumentation extends MXLInstrumentationBase {\n private readonly _listeners: WebVitalListeners;\n private readonly _urlDocument: URLDocument;\n private readonly _urlAttribution: boolean;\n private readonly _pageManager: PageManager;\n private readonly _attributedPage: Record<\n Metric['name'],\n AttributedPage | undefined\n > = {\n CLS: undefined,\n FCP: undefined,\n INP: undefined,\n LCP: undefined,\n TTFB: undefined,\n };\n private _largestShiftTargetForCLS: string | undefined;\n private _listenersRegistered = false;\n private _isEnabled = false;\n\n // Instrumentation that adds an event to the session span for each web vital report\n public constructor({\n diag,\n perf,\n listeners = WEB_VITALS_ID_TO_LISTENER,\n urlDocument = window.document,\n urlAttribution = true,\n pageManager,\n }: WebVitalsInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'WebVitalsInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n this._listeners = listeners;\n this._urlDocument = urlDocument;\n this._urlAttribution = urlAttribution;\n this._pageManager = pageManager ?? page.getPageManager();\n\n if (this._config.enabled) {\n this.enable();\n }\n }\n\n public override disable(): void {\n // Web-vitals library doesn't support removing listeners, so we just pause emission\n // https://github.com/GoogleChrome/web-vitals/issues/357#issuecomment-1593439036\n this._isEnabled = false;\n this._diag.debug('WebVitalsInstrumentation disabled, pausing emission');\n }\n\n public enable(): void {\n this._isEnabled = true;\n\n // Web-vitals library doesn't support removing listeners, so only register once\n if (this._listenersRegistered) {\n this._diag.debug(\n 'WebVitalsInstrumentation listeners already registered, resuming emission',\n );\n return;\n }\n this._listenersRegistered = true;\n\n ALL_WEB_VITALS.forEach((name) => {\n this._listeners[name]?.((metric) => {\n if (!this._isEnabled) {\n return;\n }\n\n const currentSessionSpan = this.userSessionManager.getSessionPartSpan();\n\n if (!currentSessionSpan) {\n return;\n }\n\n // First thing record the time when this cb was invoked\n const metricTime = this._getTimeForMetric(metric);\n\n const attributedPage = this._getAttributedPageForMetric(metric);\n\n const attrs: Attributes = {\n [KEY_MXL_TYPE]: MXL_TYPES.WebVital,\n [ATTR_URL_FULL]: attributedPage.fullURL,\n [KEY_BROWSER_URL_FULL]: attributedPage.fullURL,\n [KEY_MXL_WEB_VITAL_NAVIGATION_TYPE]: metric.navigationType,\n [KEY_MXL_WEB_VITAL_NAME]: metric.name,\n [KEY_MXL_WEB_VITAL_RATING]: metric.rating,\n [KEY_MXL_WEB_VITAL_ID]: metric.id,\n [KEY_MXL_WEB_VITAL_DELTA]: metric.delta,\n [KEY_MXL_WEB_VITAL_VALUE]: metric.value,\n ...webVitalAttributionToReport(metric),\n ...(name === 'INP' ? loafScriptsAttribution(metric, this._diag) : {}),\n ...(name === 'TTFB'\n ? ttfbSubPartsAttribution(metric, this._diag)\n : {}),\n };\n\n // Add page attributes if route and page ID exist\n if (attributedPage.path && attributedPage.pageID) {\n attrs[KEY_MXL_PAGE_PATH] = attributedPage.path;\n attrs[KEY_MXL_PAGE_ID] = attributedPage.pageID;\n }\n\n if (attributedPage.label) {\n attrs[KEY_APP_SURFACE_LABEL] = attributedPage.label;\n }\n\n currentSessionSpan.addEvent(\n `${MXL_WEB_VITALS_PREFIX}-report-${name}`,\n attrs,\n metricTime,\n );\n });\n });\n\n if (this._urlAttribution) {\n // When these web vitals make their final report (e.g. when the listeners w/ reportAllChanges=false trigger) the\n // Document's URL at that time may not match what it was at the time the scores were last updated. Instead, listen\n // For updates to the scores and keep track of the Page information to attribute for each\n this._listeners.TTFB?.(\n () => {\n this._attributedPage.TTFB = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.FCP?.(\n () => {\n this._attributedPage.FCP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.INP?.(\n () => {\n this._attributedPage.INP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.LCP?.(\n () => {\n this._attributedPage.LCP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.CLS?.(\n (metric: MetricWithAttribution) => {\n const clsMetric = metric as CLSMetricWithAttribution;\n // A layout shift could cause CLS to change its rating but because the score is cumulative this might not\n // Correspond with an updated `largestShiftTarget`. Since we want to tie the attributed URL to the page that\n // The `largestShiftTarget` was on we only update the attributed URL if that target has changed\n if (\n this._largestShiftTargetForCLS !==\n clsMetric.attribution.largestShiftTarget\n ) {\n this._largestShiftTargetForCLS =\n clsMetric.attribution.largestShiftTarget;\n this._attributedPage.CLS = this._currentAttributedPage();\n }\n },\n {\n reportAllChanges: true,\n },\n );\n }\n }\n\n private _getTimeForMetric(metric: MetricWithAttribution): number {\n if (metric.name === 'CLS' && metric.attribution.largestShiftTime) {\n return this.perf.epochMillisFromOriginOffset(\n metric.attribution.largestShiftTime,\n );\n }\n\n if (metric.name === 'INP' && metric.attribution.interactionTime) {\n return this.perf.epochMillisFromOriginOffset(\n metric.attribution.interactionTime,\n );\n }\n\n return this.perf.getNowMillis();\n }\n\n private _currentAttributedPage(): AttributedPage {\n const attributed: AttributedPage = {\n fullURL: this._urlDocument.URL,\n };\n\n const currentRoute = this._pageManager.getCurrentRoute();\n const currentPageId = this._pageManager.getCurrentPageId();\n if (currentRoute && currentPageId) {\n attributed.path = currentRoute.path;\n attributed.pageID = currentPageId;\n }\n\n const pageLabel = this._pageManager.getPageLabel();\n if (pageLabel) {\n attributed.label = pageLabel;\n }\n\n return attributed;\n }\n\n private _getAttributedPageForMetric(\n metric: MetricWithAttribution,\n ): AttributedPage {\n if (metric.name === 'FCP' && this._attributedPage.FCP) {\n return this._attributedPage.FCP;\n }\n\n if (metric.name === 'TTFB' && this._attributedPage.TTFB) {\n return this._attributedPage.TTFB;\n }\n\n if (metric.name === 'INP' && this._attributedPage.INP) {\n return this._attributedPage.INP;\n }\n\n if (metric.name === 'LCP' && this._attributedPage.LCP) {\n return this._attributedPage.LCP;\n }\n\n if (\n metric.name === 'CLS' &&\n this._attributedPage.CLS &&\n metric.attribution.largestShiftTarget === this._largestShiftTargetForCLS\n ) {\n return this._attributedPage.CLS;\n }\n\n return this._currentAttributedPage();\n }\n}\n"],"mappings":";;;;;;;;;AAkDA,MAAM,oBAAoB,UAA4C;CACpE,MAAM,OAAO,OAAO;AACpB,QAAO,SAAS,YAAY,SAAS,YAAY,SAAS;;AAG5D,MAAM,cAAc,UAA0B,KAAK,MAAM,KAAK,IAAI,GAAG,MAAM,CAAC;AAE5E,MAAM,+BACJ,WACe;CACf,MAAM,aAAyB,EAAE;CACjC,MAAM,EAAE,gBAAgB;AAExB,KAAI,CAAC,eAAe,OAAO,gBAAgB,SACzC,QAAO;AAGT,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,YAAY,CACpD,KAAI,iBAAiB,MAAM,CACzB,YAAW,GAAGA,wEAAAA,uCAAuC,SAAS;AAIlE,QAAO;;AAGT,MAAM,0BACJ,QACA,SACe;CACf,MAAM,aAAyB,EAAE;CACjC,MAAM,cAAc,OAAO;AAE3B,KAAI;AAGF,MAAI,YAAY,0BAA0B,SAAS,GAAG;GACpD,MAAM,0BAAU,IAAI,KAOjB;AACH,QAAK,MAAM,SAAS,YAAY,0BAC9B,MAAK,MAAM,UAAU,MAAM,SAAS;IAClC,IAAI,MAAM,OAAO,aAAa;AAC9B,QAAI,IAAI,SAAA,KACN,OAAM,GAAG,IAAI,UAAU,GAAGC,uEAAAA,2BAA2B,CAAC;IAExD,MAAM,WAAW,QAAQ,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,MACnB,CACF;;;CAIL,kBAA0B,QAAuC;AAC/D,MAAI,OAAO,SAAS,SAAS,OAAO,YAAY,iBAC9C,QAAO,KAAK,KAAK,4BACf,OAAO,YAAY,iBACpB;AAGH,MAAI,OAAO,SAAS,SAAS,OAAO,YAAY,gBAC9C,QAAO,KAAK,KAAK,4BACf,OAAO,YAAY,gBACpB;AAGH,SAAO,KAAK,KAAK,cAAc;;CAGjC,yBAAiD;EAC/C,MAAM,aAA6B,EACjC,SAAS,KAAK,aAAa,KAC5B;EAED,MAAM,eAAe,KAAK,aAAa,iBAAiB;EACxD,MAAM,gBAAgB,KAAK,aAAa,kBAAkB;AAC1D,MAAI,gBAAgB,eAAe;AACjC,cAAW,OAAO,aAAa;AAC/B,cAAW,SAAS;;EAGtB,MAAM,YAAY,KAAK,aAAa,cAAc;AAClD,MAAI,UACF,YAAW,QAAQ;AAGrB,SAAO;;CAGT,4BACE,QACgB;AAChB,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,UAAU,KAAK,gBAAgB,KACjD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MACE,OAAO,SAAS,SAChB,KAAK,gBAAgB,OACrB,OAAO,YAAY,uBAAuB,KAAK,0BAE/C,QAAO,KAAK,gBAAgB;AAG9B,SAAO,KAAK,wBAAwB"}
1
+ {"version":3,"file":"WebVitalsInstrumentation.cjs","names":["KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX","MAX_LOAF_SCRIPT_URL_LENGTH","MXLInstrumentationBase","WEB_VITALS_ID_TO_LISTENER","page","KEY_MXL_TYPE","ATTR_URL_FULL","KEY_BROWSER_URL_FULL","KEY_MXL_WEB_VITAL_NAVIGATION_TYPE","KEY_MXL_WEB_VITAL_NAME","KEY_MXL_WEB_VITAL_RATING","KEY_MXL_WEB_VITAL_ID","KEY_MXL_WEB_VITAL_DELTA","KEY_MXL_WEB_VITAL_VALUE","KEY_MXL_PAGE_PATH","KEY_MXL_PAGE_ID","KEY_APP_SURFACE_LABEL","MXL_WEB_VITALS_PREFIX"],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.ts"],"sourcesContent":["import type {\n AttributeValue,\n Attributes,\n DiagLogger,\n} from '@opentelemetry/api';\nimport { ATTR_URL_FULL } from '@opentelemetry/semantic-conventions';\nimport type {\n CLSMetricWithAttribution,\n INPAttribution,\n Metric,\n MetricWithAttribution,\n TTFBAttribution,\n} from 'web-vitals/attribution';\nimport type { PageManager } from '../../../api-page/manager/types';\nimport { page } from '../../../api-page/pageAPI';\nimport type { URLDocument } from '../../../common/types';\nimport { KEY_APP_SURFACE_LABEL, KEY_BROWSER_URL_FULL, KEY_MXL_PAGE_ID, KEY_MXL_PAGE_PATH, KEY_MXL_TYPE, MXL_TYPES } from '../../../constants/attributes';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport {\n KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX,\n KEY_MXL_WEB_VITAL_DELTA,\n KEY_MXL_WEB_VITAL_ID,\n KEY_MXL_WEB_VITAL_NAME,\n KEY_MXL_WEB_VITAL_NAVIGATION_TYPE,\n KEY_MXL_WEB_VITAL_RATING,\n KEY_MXL_WEB_VITAL_VALUE,\n} from './attributes';\nimport {\n ALL_WEB_VITALS,\n MAX_LOAF_SCRIPT_ENTRIES,\n MAX_LOAF_SCRIPT_URL_LENGTH,\n MXL_WEB_VITALS_PREFIX,\n WEB_VITALS_ID_TO_LISTENER,\n} from './constants';\nimport type { WebVitalListeners, WebVitalsInstrumentationArgs } from './types';\n\ninterface AttributedPage {\n fullURL: string;\n path?: string;\n pageID?: string;\n label?: string;\n}\n\nconst isPrimitiveValue = (value: unknown): value is AttributeValue => {\n const type = typeof value;\n return type === 'number' || type === 'string' || type === 'boolean';\n};\n\nconst roundClamp = (value: number): number => Math.round(Math.max(0, value));\n\nconst webVitalAttributionToReport = (\n metric: MetricWithAttribution,\n): Attributes => {\n const attributes: Attributes = {};\n const { attribution } = metric;\n\n if (!attribution || typeof attribution !== 'object') {\n return attributes;\n }\n\n for (const [key, value] of Object.entries(attribution)) {\n if (isPrimitiveValue(value)) {\n attributes[`${KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX}${key}`] = value;\n }\n }\n\n return attributes;\n};\n\nconst loafScriptsAttribution = (\n metric: MetricWithAttribution,\n diag: DiagLogger,\n): Attributes => {\n const attributes: Attributes = {};\n const attribution = metric.attribution as INPAttribution;\n\n try {\n // Suppress LoAF baseline errors\n /* eslint-disable baseline-js/use-baseline */\n if (attribution.longAnimationFrameEntries.length > 0) {\n const scripts = new Map<\n string,\n {\n totalDuration: number;\n styleAndLayoutDuration: number;\n count: number;\n }\n >();\n for (const entry of attribution.longAnimationFrameEntries) {\n for (const script of entry.scripts) {\n let url = script.sourceURL || '(inline)';\n if (url.length > MAX_LOAF_SCRIPT_URL_LENGTH) {\n url = `${url.substring(0, MAX_LOAF_SCRIPT_URL_LENGTH)}...`;\n }\n const existing = scripts.get(url);\n if (existing) {\n existing.totalDuration += script.duration;\n existing.styleAndLayoutDuration +=\n script.forcedStyleAndLayoutDuration;\n existing.count++;\n } else {\n scripts.set(url, {\n count: 1,\n styleAndLayoutDuration: script.forcedStyleAndLayoutDuration,\n totalDuration: script.duration,\n });\n }\n }\n }\n if (scripts.size > 0) {\n attributes[`${KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX}loaf_scripts`] =\n JSON.stringify(\n Object.fromEntries(\n [...scripts]\n .sort((a, b) => b[1].totalDuration - a[1].totalDuration)\n .slice(0, MAX_LOAF_SCRIPT_ENTRIES)\n .map(([url, script]) => [\n url,\n {\n count: script.count,\n style_and_layout_duration: Math.round(\n script.styleAndLayoutDuration,\n ),\n total_duration: Math.round(script.totalDuration),\n },\n ]),\n ),\n );\n }\n }\n /* eslint-enable baseline-js/use-baseline */\n } catch (error) {\n diag.error('error building loaf scripts for INP', error);\n }\n\n return attributes;\n};\n\nconst ttfbSubPartsAttribution = (\n metric: MetricWithAttribution,\n diag: DiagLogger,\n): Attributes => {\n const attributes: Attributes = {};\n const attribution = metric.attribution as TTFBAttribution;\n const entry = attribution.navigationEntry as\n | PerformanceNavigationTiming\n | undefined;\n\n if (entry) {\n try {\n const redirect = roundClamp(entry.redirectEnd - entry.redirectStart);\n const domainLookup = roundClamp(\n entry.domainLookupEnd - entry.domainLookupStart,\n );\n const tcpConnection = roundClamp(\n entry.secureConnectionStart > 0\n ? entry.secureConnectionStart - entry.connectStart\n : entry.connectEnd - entry.connectStart,\n );\n const tlsNegotiation = roundClamp(\n entry.secureConnectionStart > 0\n ? entry.connectEnd - entry.secureConnectionStart\n : 0,\n );\n const effectiveResponseStart = Math.max(\n // @ts-expect-error 103 Early hints are not supported in all browsers\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart\n entry.finalResponseHeadersStart ?? 0,\n entry.responseStart,\n );\n const serverResponse = roundClamp(\n effectiveResponseStart - entry.requestStart,\n );\n const total = Math.round(entry.responseEnd - entry.startTime);\n const unattributed = roundClamp(\n total -\n redirect -\n domainLookup -\n tcpConnection -\n tlsNegotiation -\n serverResponse,\n );\n const prefix = KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX;\n attributes[`${prefix}redirect`] = redirect;\n attributes[`${prefix}domainLookup`] = domainLookup;\n attributes[`${prefix}tcpConnection`] = tcpConnection;\n attributes[`${prefix}tlsNegotiation`] = tlsNegotiation;\n attributes[`${prefix}serverResponse`] = serverResponse;\n attributes[`${prefix}unattributed`] = unattributed;\n } catch (error) {\n diag.error('error computing TTFB timing breakdown', error);\n }\n } else {\n diag.debug('TTFB navigationEntry unavailable, skipping timing breakdown');\n }\n\n return attributes;\n};\n\nexport class WebVitalsInstrumentation extends MXLInstrumentationBase {\n private readonly _listeners: WebVitalListeners;\n private readonly _urlDocument: URLDocument;\n private readonly _urlAttribution: boolean;\n private readonly _pageManager: PageManager;\n private readonly _attributedPage: Record<\n Metric['name'],\n AttributedPage | undefined\n > = {\n CLS: undefined,\n FCP: undefined,\n INP: undefined,\n LCP: undefined,\n TTFB: undefined,\n };\n private _largestShiftTargetForCLS: string | undefined;\n private _listenersRegistered = false;\n private _isEnabled = false;\n\n // Instrumentation that adds an event to the session span for each web vital report\n public constructor({\n diag,\n perf,\n listeners = WEB_VITALS_ID_TO_LISTENER,\n urlDocument = window.document,\n urlAttribution = true,\n pageManager,\n }: WebVitalsInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'WebVitalsInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n this._listeners = listeners;\n this._urlDocument = urlDocument;\n this._urlAttribution = urlAttribution;\n this._pageManager = pageManager ?? page.getPageManager();\n\n if (this._config.enabled) {\n this.enable();\n }\n }\n\n public override disable(): void {\n // Web-vitals library doesn't support removing listeners, so we just pause emission\n // https://github.com/GoogleChrome/web-vitals/issues/357#issuecomment-1593439036\n this._isEnabled = false;\n this._diag.debug('WebVitalsInstrumentation disabled, pausing emission');\n }\n\n public enable(): void {\n this._isEnabled = true;\n\n // Web-vitals library doesn't support removing listeners, so only register once\n if (this._listenersRegistered) {\n this._diag.debug(\n 'WebVitalsInstrumentation listeners already registered, resuming emission',\n );\n return;\n }\n this._listenersRegistered = true;\n\n ALL_WEB_VITALS.forEach((name) => {\n this._listeners[name]?.((metric) => {\n if (!this._isEnabled) {\n return;\n }\n\n const currentSessionSpan = this.userSessionManager.getSessionPartSpan();\n\n if (!currentSessionSpan) {\n return;\n }\n\n // First thing record the time when this cb was invoked\n const metricTime = this._getTimeForMetric(metric);\n\n const attributedPage = this._getAttributedPageForMetric(metric);\n\n const attrs: Attributes = {\n [KEY_MXL_TYPE]: MXL_TYPES.WebVital,\n [ATTR_URL_FULL]: attributedPage.fullURL,\n [KEY_BROWSER_URL_FULL]: attributedPage.fullURL,\n [KEY_MXL_WEB_VITAL_NAVIGATION_TYPE]: metric.navigationType,\n [KEY_MXL_WEB_VITAL_NAME]: metric.name,\n [KEY_MXL_WEB_VITAL_RATING]: metric.rating,\n [KEY_MXL_WEB_VITAL_ID]: metric.id,\n [KEY_MXL_WEB_VITAL_DELTA]: metric.delta,\n [KEY_MXL_WEB_VITAL_VALUE]: metric.value,\n ...webVitalAttributionToReport(metric),\n ...(name === 'INP' ? loafScriptsAttribution(metric, this._diag) : {}),\n ...(name === 'TTFB'\n ? ttfbSubPartsAttribution(metric, this._diag)\n : {}),\n };\n\n // Add page attributes if route and page ID exist\n if (attributedPage.path && attributedPage.pageID) {\n attrs[KEY_MXL_PAGE_PATH] = attributedPage.path;\n attrs[KEY_MXL_PAGE_ID] = attributedPage.pageID;\n }\n\n if (attributedPage.label) {\n attrs[KEY_APP_SURFACE_LABEL] = attributedPage.label;\n }\n\n currentSessionSpan.addEvent(\n `${MXL_WEB_VITALS_PREFIX}-report-${name}`,\n attrs,\n metricTime,\n );\n });\n });\n\n if (this._urlAttribution) {\n // When these web vitals make their final report (e.g. when the listeners w/ reportAllChanges=false trigger) the\n // Document's URL at that time may not match what it was at the time the scores were last updated. Instead, listen\n // For updates to the scores and keep track of the Page information to attribute for each\n this._listeners.TTFB?.(\n () => {\n this._attributedPage.TTFB = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.FCP?.(\n () => {\n this._attributedPage.FCP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.INP?.(\n () => {\n this._attributedPage.INP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.LCP?.(\n () => {\n this._attributedPage.LCP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.CLS?.(\n (metric: MetricWithAttribution) => {\n const clsMetric = metric as CLSMetricWithAttribution;\n // A layout shift could cause CLS to change its rating but because the score is cumulative this might not\n // Correspond with an updated `largestShiftTarget`. Since we want to tie the attributed URL to the page that\n // The `largestShiftTarget` was on we only update the attributed URL if that target has changed\n if (\n this._largestShiftTargetForCLS !==\n clsMetric.attribution.largestShiftTarget\n ) {\n this._largestShiftTargetForCLS =\n clsMetric.attribution.largestShiftTarget;\n this._attributedPage.CLS = this._currentAttributedPage();\n }\n },\n {\n reportAllChanges: true,\n },\n );\n }\n }\n\n private _getTimeForMetric(metric: MetricWithAttribution): number {\n if (metric.name === 'CLS' && metric.attribution.largestShiftTime) {\n return this.perf.epochMillisFromOriginOffset(\n metric.attribution.largestShiftTime,\n );\n }\n\n if (metric.name === 'INP' && metric.attribution.interactionTime) {\n return this.perf.epochMillisFromOriginOffset(\n metric.attribution.interactionTime,\n );\n }\n\n return this.perf.getNowMillis();\n }\n\n private _currentAttributedPage(): AttributedPage {\n const attributed: AttributedPage = {\n fullURL: this._urlDocument.URL,\n };\n\n const currentRoute = this._pageManager.getCurrentRoute();\n const currentPageId = this._pageManager.getCurrentPageId();\n if (currentRoute && currentPageId) {\n attributed.path = currentRoute.path;\n attributed.pageID = currentPageId;\n }\n\n const pageLabel = this._pageManager.getPageLabel();\n if (pageLabel) {\n attributed.label = pageLabel;\n }\n\n return attributed;\n }\n\n private _getAttributedPageForMetric(\n metric: MetricWithAttribution,\n ): AttributedPage {\n if (metric.name === 'FCP' && this._attributedPage.FCP) {\n return this._attributedPage.FCP;\n }\n\n if (metric.name === 'TTFB' && this._attributedPage.TTFB) {\n return this._attributedPage.TTFB;\n }\n\n if (metric.name === 'INP' && this._attributedPage.INP) {\n return this._attributedPage.INP;\n }\n\n if (metric.name === 'LCP' && this._attributedPage.LCP) {\n return this._attributedPage.LCP;\n }\n\n if (\n metric.name === 'CLS' &&\n this._attributedPage.CLS &&\n metric.attribution.largestShiftTarget === this._largestShiftTargetForCLS\n ) {\n return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AAM,gBAAgB,KAAK,aAAa,kBAAkB;AAC1D,MAAI,gBAAgB,eAAe;AACjC,cAAW,OAAO,aAAa;AAC/B,cAAW,SAAS;;EAGtB,MAAM,YAAY,KAAK,aAAa,cAAc;AAClD,MAAI,UACF,YAAW,QAAQ;AAGrB,SAAO;;CAGT,4BACE,QACgB;AAChB,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,UAAU,KAAK,gBAAgB,KACjD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MACE,OAAO,SAAS,SAChB,KAAK,gBAAgB,OACrB,OAAO,YAAY,uBAAuB,KAAK,0BAE/C,QAAO,KAAK,gBAAgB;AAG9B,SAAO,KAAK,wBAAwB"}
@@ -1 +1 @@
1
- {"version":3,"file":"WebVitalsInstrumentation.d.cts","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.ts"],"mappings":";;;;cA8Ma,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,UAAA;EAAA,iBACA,YAAA;EAAA,iBACA,eAAA;EAAA,iBACA,YAAA;EAAA,iBACA,eAAA;EAAA,QAUT,yBAAA;EAAA,QACA,oBAAA;EAAA,QACA,UAAA;;IAIN,IAAA;IACA,IAAA;IACA,SAAA;IACA,WAAA;IACA,cAAA;IACA;EAAA,IACC,4BAAA;EAkBa,OAAA,CAAA;EAOT,MAAA,CAAA;EAAA,QA0HC,iBAAA;EAAA,QAgBA,sBAAA;EAAA,QAoBA,2BAAA;AAAA"}
1
+ {"version":3,"file":"WebVitalsInstrumentation.d.cts","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.ts"],"mappings":";;;;cAuMa,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,UAAA;EAAA,iBACA,YAAA;EAAA,iBACA,eAAA;EAAA,iBACA,YAAA;EAAA,iBACA,eAAA;EAAA,QAUT,yBAAA;EAAA,QACA,oBAAA;EAAA,QACA,UAAA;;IAIN,IAAA;IACA,IAAA;IACA,SAAA;IACA,WAAA;IACA,cAAA;IACA;EAAA,IACC,4BAAA;EAkBa,OAAA,CAAA;EAOT,MAAA,CAAA;EAAA,QA0HC,iBAAA;EAAA,QAgBA,sBAAA;EAAA,QAoBA,2BAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"WebVitalsInstrumentation.d.ts","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.ts"],"mappings":";;;;cA8Ma,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,UAAA;EAAA,iBACA,YAAA;EAAA,iBACA,eAAA;EAAA,iBACA,YAAA;EAAA,iBACA,eAAA;EAAA,QAUT,yBAAA;EAAA,QACA,oBAAA;EAAA,QACA,UAAA;;IAIN,IAAA;IACA,IAAA;IACA,SAAA;IACA,WAAA;IACA,cAAA;IACA;EAAA,IACC,4BAAA;EAkBa,OAAA,CAAA;EAOT,MAAA,CAAA;EAAA,QA0HC,iBAAA;EAAA,QAgBA,sBAAA;EAAA,QAoBA,2BAAA;AAAA"}
1
+ {"version":3,"file":"WebVitalsInstrumentation.d.ts","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.ts"],"mappings":";;;;cAuMa,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,UAAA;EAAA,iBACA,YAAA;EAAA,iBACA,eAAA;EAAA,iBACA,YAAA;EAAA,iBACA,eAAA;EAAA,QAUT,yBAAA;EAAA,QACA,oBAAA;EAAA,QACA,UAAA;;IAIN,IAAA;IACA,IAAA;IACA,SAAA;IACA,WAAA;IACA,cAAA;IACA;EAAA,IACC,4BAAA;EAkBa,OAAA,CAAA;EAOT,MAAA,CAAA;EAAA,QA0HC,iBAAA;EAAA,QAgBA,sBAAA;EAAA,QAoBA,2BAAA;AAAA"}
@@ -1,5 +1,5 @@
1
- import { KEY_APP_SURFACE_LABEL, KEY_BROWSER_URL_FULL, KEY_MXL_PAGE_ID, KEY_MXL_PAGE_PATH, KEY_MXL_TYPE } from "../../../constants/attributes.js";
2
1
  import { page } from "../../../api-page/pageAPI.js";
2
+ import { KEY_APP_SURFACE_LABEL, KEY_BROWSER_URL_FULL, KEY_MXL_PAGE_ID, KEY_MXL_PAGE_PATH, KEY_MXL_TYPE } from "../../../constants/attributes.js";
3
3
  import { MXLInstrumentationBase } from "../../MXLInstrumentationBase/MXLInstrumentationBase.js";
4
4
  import { KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX, KEY_MXL_WEB_VITAL_DELTA, KEY_MXL_WEB_VITAL_ID, KEY_MXL_WEB_VITAL_NAME, KEY_MXL_WEB_VITAL_NAVIGATION_TYPE, KEY_MXL_WEB_VITAL_RATING, KEY_MXL_WEB_VITAL_VALUE } from "./attributes.js";
5
5
  import { ALL_WEB_VITALS, MAX_LOAF_SCRIPT_URL_LENGTH, MXL_WEB_VITALS_PREFIX, WEB_VITALS_ID_TO_LISTENER } from "./constants.js";
@@ -1 +1 @@
1
- {"version":3,"file":"WebVitalsInstrumentation.js","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.ts"],"sourcesContent":["import type {\n AttributeValue,\n Attributes,\n DiagLogger,\n} from '@opentelemetry/api';\nimport { ATTR_URL_FULL } from '@opentelemetry/semantic-conventions';\nimport type {\n CLSMetricWithAttribution,\n INPAttribution,\n Metric,\n MetricWithAttribution,\n TTFBAttribution,\n} from 'web-vitals/attribution';\nimport type { PageManager } from '../../../api-page';\nimport { page } from '../../../api-page';\nimport type { URLDocument } from '../../../common';\nimport {\n KEY_APP_SURFACE_LABEL,\n KEY_BROWSER_URL_FULL,\n KEY_MXL_PAGE_ID,\n KEY_MXL_PAGE_PATH,\n KEY_MXL_TYPE,\n MXL_TYPES,\n} from '../../../constants';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase';\nimport {\n KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX,\n KEY_MXL_WEB_VITAL_DELTA,\n KEY_MXL_WEB_VITAL_ID,\n KEY_MXL_WEB_VITAL_NAME,\n KEY_MXL_WEB_VITAL_NAVIGATION_TYPE,\n KEY_MXL_WEB_VITAL_RATING,\n KEY_MXL_WEB_VITAL_VALUE,\n} from './attributes';\nimport {\n ALL_WEB_VITALS,\n MAX_LOAF_SCRIPT_ENTRIES,\n MAX_LOAF_SCRIPT_URL_LENGTH,\n MXL_WEB_VITALS_PREFIX,\n WEB_VITALS_ID_TO_LISTENER,\n} from './constants';\nimport type { WebVitalListeners, WebVitalsInstrumentationArgs } from './types';\n\ninterface AttributedPage {\n fullURL: string;\n path?: string;\n pageID?: string;\n label?: string;\n}\n\nconst isPrimitiveValue = (value: unknown): value is AttributeValue => {\n const type = typeof value;\n return type === 'number' || type === 'string' || type === 'boolean';\n};\n\nconst roundClamp = (value: number): number => Math.round(Math.max(0, value));\n\nconst webVitalAttributionToReport = (\n metric: MetricWithAttribution,\n): Attributes => {\n const attributes: Attributes = {};\n const { attribution } = metric;\n\n if (!attribution || typeof attribution !== 'object') {\n return attributes;\n }\n\n for (const [key, value] of Object.entries(attribution)) {\n if (isPrimitiveValue(value)) {\n attributes[`${KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX}${key}`] = value;\n }\n }\n\n return attributes;\n};\n\nconst loafScriptsAttribution = (\n metric: MetricWithAttribution,\n diag: DiagLogger,\n): Attributes => {\n const attributes: Attributes = {};\n const attribution = metric.attribution as INPAttribution;\n\n try {\n // Suppress LoAF baseline errors\n /* eslint-disable baseline-js/use-baseline */\n if (attribution.longAnimationFrameEntries.length > 0) {\n const scripts = new Map<\n string,\n {\n totalDuration: number;\n styleAndLayoutDuration: number;\n count: number;\n }\n >();\n for (const entry of attribution.longAnimationFrameEntries) {\n for (const script of entry.scripts) {\n let url = script.sourceURL || '(inline)';\n if (url.length > MAX_LOAF_SCRIPT_URL_LENGTH) {\n url = `${url.substring(0, MAX_LOAF_SCRIPT_URL_LENGTH)}...`;\n }\n const existing = scripts.get(url);\n if (existing) {\n existing.totalDuration += script.duration;\n existing.styleAndLayoutDuration +=\n script.forcedStyleAndLayoutDuration;\n existing.count++;\n } else {\n scripts.set(url, {\n count: 1,\n styleAndLayoutDuration: script.forcedStyleAndLayoutDuration,\n totalDuration: script.duration,\n });\n }\n }\n }\n if (scripts.size > 0) {\n attributes[`${KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX}loaf_scripts`] =\n JSON.stringify(\n Object.fromEntries(\n [...scripts]\n .sort((a, b) => b[1].totalDuration - a[1].totalDuration)\n .slice(0, MAX_LOAF_SCRIPT_ENTRIES)\n .map(([url, script]) => [\n url,\n {\n count: script.count,\n style_and_layout_duration: Math.round(\n script.styleAndLayoutDuration,\n ),\n total_duration: Math.round(script.totalDuration),\n },\n ]),\n ),\n );\n }\n }\n /* eslint-enable baseline-js/use-baseline */\n } catch (error) {\n diag.error('error building loaf scripts for INP', error);\n }\n\n return attributes;\n};\n\nconst ttfbSubPartsAttribution = (\n metric: MetricWithAttribution,\n diag: DiagLogger,\n): Attributes => {\n const attributes: Attributes = {};\n const attribution = metric.attribution as TTFBAttribution;\n const entry = attribution.navigationEntry as\n | PerformanceNavigationTiming\n | undefined;\n\n if (entry) {\n try {\n const redirect = roundClamp(entry.redirectEnd - entry.redirectStart);\n const domainLookup = roundClamp(\n entry.domainLookupEnd - entry.domainLookupStart,\n );\n const tcpConnection = roundClamp(\n entry.secureConnectionStart > 0\n ? entry.secureConnectionStart - entry.connectStart\n : entry.connectEnd - entry.connectStart,\n );\n const tlsNegotiation = roundClamp(\n entry.secureConnectionStart > 0\n ? entry.connectEnd - entry.secureConnectionStart\n : 0,\n );\n const effectiveResponseStart = Math.max(\n // @ts-expect-error 103 Early hints are not supported in all browsers\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart\n entry.finalResponseHeadersStart ?? 0,\n entry.responseStart,\n );\n const serverResponse = roundClamp(\n effectiveResponseStart - entry.requestStart,\n );\n const total = Math.round(entry.responseEnd - entry.startTime);\n const unattributed = roundClamp(\n total -\n redirect -\n domainLookup -\n tcpConnection -\n tlsNegotiation -\n serverResponse,\n );\n const prefix = KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX;\n attributes[`${prefix}redirect`] = redirect;\n attributes[`${prefix}domainLookup`] = domainLookup;\n attributes[`${prefix}tcpConnection`] = tcpConnection;\n attributes[`${prefix}tlsNegotiation`] = tlsNegotiation;\n attributes[`${prefix}serverResponse`] = serverResponse;\n attributes[`${prefix}unattributed`] = unattributed;\n } catch (error) {\n diag.error('error computing TTFB timing breakdown', error);\n }\n } else {\n diag.debug('TTFB navigationEntry unavailable, skipping timing breakdown');\n }\n\n return attributes;\n};\n\nexport class WebVitalsInstrumentation extends MXLInstrumentationBase {\n private readonly _listeners: WebVitalListeners;\n private readonly _urlDocument: URLDocument;\n private readonly _urlAttribution: boolean;\n private readonly _pageManager: PageManager;\n private readonly _attributedPage: Record<\n Metric['name'],\n AttributedPage | undefined\n > = {\n CLS: undefined,\n FCP: undefined,\n INP: undefined,\n LCP: undefined,\n TTFB: undefined,\n };\n private _largestShiftTargetForCLS: string | undefined;\n private _listenersRegistered = false;\n private _isEnabled = false;\n\n // Instrumentation that adds an event to the session span for each web vital report\n public constructor({\n diag,\n perf,\n listeners = WEB_VITALS_ID_TO_LISTENER,\n urlDocument = window.document,\n urlAttribution = true,\n pageManager,\n }: WebVitalsInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'WebVitalsInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n this._listeners = listeners;\n this._urlDocument = urlDocument;\n this._urlAttribution = urlAttribution;\n this._pageManager = pageManager ?? page.getPageManager();\n\n if (this._config.enabled) {\n this.enable();\n }\n }\n\n public override disable(): void {\n // Web-vitals library doesn't support removing listeners, so we just pause emission\n // https://github.com/GoogleChrome/web-vitals/issues/357#issuecomment-1593439036\n this._isEnabled = false;\n this._diag.debug('WebVitalsInstrumentation disabled, pausing emission');\n }\n\n public enable(): void {\n this._isEnabled = true;\n\n // Web-vitals library doesn't support removing listeners, so only register once\n if (this._listenersRegistered) {\n this._diag.debug(\n 'WebVitalsInstrumentation listeners already registered, resuming emission',\n );\n return;\n }\n this._listenersRegistered = true;\n\n ALL_WEB_VITALS.forEach((name) => {\n this._listeners[name]?.((metric) => {\n if (!this._isEnabled) {\n return;\n }\n\n const currentSessionSpan = this.userSessionManager.getSessionPartSpan();\n\n if (!currentSessionSpan) {\n return;\n }\n\n // First thing record the time when this cb was invoked\n const metricTime = this._getTimeForMetric(metric);\n\n const attributedPage = this._getAttributedPageForMetric(metric);\n\n const attrs: Attributes = {\n [KEY_MXL_TYPE]: MXL_TYPES.WebVital,\n [ATTR_URL_FULL]: attributedPage.fullURL,\n [KEY_BROWSER_URL_FULL]: attributedPage.fullURL,\n [KEY_MXL_WEB_VITAL_NAVIGATION_TYPE]: metric.navigationType,\n [KEY_MXL_WEB_VITAL_NAME]: metric.name,\n [KEY_MXL_WEB_VITAL_RATING]: metric.rating,\n [KEY_MXL_WEB_VITAL_ID]: metric.id,\n [KEY_MXL_WEB_VITAL_DELTA]: metric.delta,\n [KEY_MXL_WEB_VITAL_VALUE]: metric.value,\n ...webVitalAttributionToReport(metric),\n ...(name === 'INP' ? loafScriptsAttribution(metric, this._diag) : {}),\n ...(name === 'TTFB'\n ? ttfbSubPartsAttribution(metric, this._diag)\n : {}),\n };\n\n // Add page attributes if route and page ID exist\n if (attributedPage.path && attributedPage.pageID) {\n attrs[KEY_MXL_PAGE_PATH] = attributedPage.path;\n attrs[KEY_MXL_PAGE_ID] = attributedPage.pageID;\n }\n\n if (attributedPage.label) {\n attrs[KEY_APP_SURFACE_LABEL] = attributedPage.label;\n }\n\n currentSessionSpan.addEvent(\n `${MXL_WEB_VITALS_PREFIX}-report-${name}`,\n attrs,\n metricTime,\n );\n });\n });\n\n if (this._urlAttribution) {\n // When these web vitals make their final report (e.g. when the listeners w/ reportAllChanges=false trigger) the\n // Document's URL at that time may not match what it was at the time the scores were last updated. Instead, listen\n // For updates to the scores and keep track of the Page information to attribute for each\n this._listeners.TTFB?.(\n () => {\n this._attributedPage.TTFB = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.FCP?.(\n () => {\n this._attributedPage.FCP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.INP?.(\n () => {\n this._attributedPage.INP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.LCP?.(\n () => {\n this._attributedPage.LCP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.CLS?.(\n (metric: MetricWithAttribution) => {\n const clsMetric = metric as CLSMetricWithAttribution;\n // A layout shift could cause CLS to change its rating but because the score is cumulative this might not\n // Correspond with an updated `largestShiftTarget`. Since we want to tie the attributed URL to the page that\n // The `largestShiftTarget` was on we only update the attributed URL if that target has changed\n if (\n this._largestShiftTargetForCLS !==\n clsMetric.attribution.largestShiftTarget\n ) {\n this._largestShiftTargetForCLS =\n clsMetric.attribution.largestShiftTarget;\n this._attributedPage.CLS = this._currentAttributedPage();\n }\n },\n {\n reportAllChanges: true,\n },\n );\n }\n }\n\n private _getTimeForMetric(metric: MetricWithAttribution): number {\n if (metric.name === 'CLS' && metric.attribution.largestShiftTime) {\n return this.perf.epochMillisFromOriginOffset(\n metric.attribution.largestShiftTime,\n );\n }\n\n if (metric.name === 'INP' && metric.attribution.interactionTime) {\n return this.perf.epochMillisFromOriginOffset(\n metric.attribution.interactionTime,\n );\n }\n\n return this.perf.getNowMillis();\n }\n\n private _currentAttributedPage(): AttributedPage {\n const attributed: AttributedPage = {\n fullURL: this._urlDocument.URL,\n };\n\n const currentRoute = this._pageManager.getCurrentRoute();\n const currentPageId = this._pageManager.getCurrentPageId();\n if (currentRoute && currentPageId) {\n attributed.path = currentRoute.path;\n attributed.pageID = currentPageId;\n }\n\n const pageLabel = this._pageManager.getPageLabel();\n if (pageLabel) {\n attributed.label = pageLabel;\n }\n\n return attributed;\n }\n\n private _getAttributedPageForMetric(\n metric: MetricWithAttribution,\n ): AttributedPage {\n if (metric.name === 'FCP' && this._attributedPage.FCP) {\n return this._attributedPage.FCP;\n }\n\n if (metric.name === 'TTFB' && this._attributedPage.TTFB) {\n return this._attributedPage.TTFB;\n }\n\n if (metric.name === 'INP' && this._attributedPage.INP) {\n return this._attributedPage.INP;\n }\n\n if (metric.name === 'LCP' && this._attributedPage.LCP) {\n return this._attributedPage.LCP;\n }\n\n if (\n metric.name === 'CLS' &&\n this._attributedPage.CLS &&\n metric.attribution.largestShiftTarget === this._largestShiftTargetForCLS\n ) {\n return this._attributedPage.CLS;\n }\n\n return this._currentAttributedPage();\n }\n}\n"],"mappings":";;;;;;;AAkDA,MAAM,oBAAoB,UAA4C;CACpE,MAAM,OAAO,OAAO;AACpB,QAAO,SAAS,YAAY,SAAS,YAAY,SAAS;;AAG5D,MAAM,cAAc,UAA0B,KAAK,MAAM,KAAK,IAAI,GAAG,MAAM,CAAC;AAE5E,MAAM,+BACJ,WACe;CACf,MAAM,aAAyB,EAAE;CACjC,MAAM,EAAE,gBAAgB;AAExB,KAAI,CAAC,eAAe,OAAO,gBAAgB,SACzC,QAAO;AAGT,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,YAAY,CACpD,KAAI,iBAAiB,MAAM,CACzB,YAAW,GAAG,uCAAuC,SAAS;AAIlE,QAAO;;AAGT,MAAM,0BACJ,QACA,SACe;CACf,MAAM,aAAyB,EAAE;CACjC,MAAM,cAAc,OAAO;AAE3B,KAAI;AAGF,MAAI,YAAY,0BAA0B,SAAS,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,UAAK,gBAAgB,MAAM,KAAK,wBAAwB;;MAG5D,EACE,kBAAkB,MACnB,CACF;;;CAIL,kBAA0B,QAAuC;AAC/D,MAAI,OAAO,SAAS,SAAS,OAAO,YAAY,iBAC9C,QAAO,KAAK,KAAK,4BACf,OAAO,YAAY,iBACpB;AAGH,MAAI,OAAO,SAAS,SAAS,OAAO,YAAY,gBAC9C,QAAO,KAAK,KAAK,4BACf,OAAO,YAAY,gBACpB;AAGH,SAAO,KAAK,KAAK,cAAc;;CAGjC,yBAAiD;EAC/C,MAAM,aAA6B,EACjC,SAAS,KAAK,aAAa,KAC5B;EAED,MAAM,eAAe,KAAK,aAAa,iBAAiB;EACxD,MAAM,gBAAgB,KAAK,aAAa,kBAAkB;AAC1D,MAAI,gBAAgB,eAAe;AACjC,cAAW,OAAO,aAAa;AAC/B,cAAW,SAAS;;EAGtB,MAAM,YAAY,KAAK,aAAa,cAAc;AAClD,MAAI,UACF,YAAW,QAAQ;AAGrB,SAAO;;CAGT,4BACE,QACgB;AAChB,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,UAAU,KAAK,gBAAgB,KACjD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MAAI,OAAO,SAAS,SAAS,KAAK,gBAAgB,IAChD,QAAO,KAAK,gBAAgB;AAG9B,MACE,OAAO,SAAS,SAChB,KAAK,gBAAgB,OACrB,OAAO,YAAY,uBAAuB,KAAK,0BAE/C,QAAO,KAAK,gBAAgB;AAG9B,SAAO,KAAK,wBAAwB"}
1
+ {"version":3,"file":"WebVitalsInstrumentation.js","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.ts"],"sourcesContent":["import type {\n AttributeValue,\n Attributes,\n DiagLogger,\n} from '@opentelemetry/api';\nimport { ATTR_URL_FULL } from '@opentelemetry/semantic-conventions';\nimport type {\n CLSMetricWithAttribution,\n INPAttribution,\n Metric,\n MetricWithAttribution,\n TTFBAttribution,\n} from 'web-vitals/attribution';\nimport type { PageManager } from '../../../api-page/manager/types';\nimport { page } from '../../../api-page/pageAPI';\nimport type { URLDocument } from '../../../common/types';\nimport { KEY_APP_SURFACE_LABEL, KEY_BROWSER_URL_FULL, KEY_MXL_PAGE_ID, KEY_MXL_PAGE_PATH, KEY_MXL_TYPE, MXL_TYPES } from '../../../constants/attributes';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport {\n KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX,\n KEY_MXL_WEB_VITAL_DELTA,\n KEY_MXL_WEB_VITAL_ID,\n KEY_MXL_WEB_VITAL_NAME,\n KEY_MXL_WEB_VITAL_NAVIGATION_TYPE,\n KEY_MXL_WEB_VITAL_RATING,\n KEY_MXL_WEB_VITAL_VALUE,\n} from './attributes';\nimport {\n ALL_WEB_VITALS,\n MAX_LOAF_SCRIPT_ENTRIES,\n MAX_LOAF_SCRIPT_URL_LENGTH,\n MXL_WEB_VITALS_PREFIX,\n WEB_VITALS_ID_TO_LISTENER,\n} from './constants';\nimport type { WebVitalListeners, WebVitalsInstrumentationArgs } from './types';\n\ninterface AttributedPage {\n fullURL: string;\n path?: string;\n pageID?: string;\n label?: string;\n}\n\nconst isPrimitiveValue = (value: unknown): value is AttributeValue => {\n const type = typeof value;\n return type === 'number' || type === 'string' || type === 'boolean';\n};\n\nconst roundClamp = (value: number): number => Math.round(Math.max(0, value));\n\nconst webVitalAttributionToReport = (\n metric: MetricWithAttribution,\n): Attributes => {\n const attributes: Attributes = {};\n const { attribution } = metric;\n\n if (!attribution || typeof attribution !== 'object') {\n return attributes;\n }\n\n for (const [key, value] of Object.entries(attribution)) {\n if (isPrimitiveValue(value)) {\n attributes[`${KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX}${key}`] = value;\n }\n }\n\n return attributes;\n};\n\nconst loafScriptsAttribution = (\n metric: MetricWithAttribution,\n diag: DiagLogger,\n): Attributes => {\n const attributes: Attributes = {};\n const attribution = metric.attribution as INPAttribution;\n\n try {\n // Suppress LoAF baseline errors\n /* eslint-disable baseline-js/use-baseline */\n if (attribution.longAnimationFrameEntries.length > 0) {\n const scripts = new Map<\n string,\n {\n totalDuration: number;\n styleAndLayoutDuration: number;\n count: number;\n }\n >();\n for (const entry of attribution.longAnimationFrameEntries) {\n for (const script of entry.scripts) {\n let url = script.sourceURL || '(inline)';\n if (url.length > MAX_LOAF_SCRIPT_URL_LENGTH) {\n url = `${url.substring(0, MAX_LOAF_SCRIPT_URL_LENGTH)}...`;\n }\n const existing = scripts.get(url);\n if (existing) {\n existing.totalDuration += script.duration;\n existing.styleAndLayoutDuration +=\n script.forcedStyleAndLayoutDuration;\n existing.count++;\n } else {\n scripts.set(url, {\n count: 1,\n styleAndLayoutDuration: script.forcedStyleAndLayoutDuration,\n totalDuration: script.duration,\n });\n }\n }\n }\n if (scripts.size > 0) {\n attributes[`${KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX}loaf_scripts`] =\n JSON.stringify(\n Object.fromEntries(\n [...scripts]\n .sort((a, b) => b[1].totalDuration - a[1].totalDuration)\n .slice(0, MAX_LOAF_SCRIPT_ENTRIES)\n .map(([url, script]) => [\n url,\n {\n count: script.count,\n style_and_layout_duration: Math.round(\n script.styleAndLayoutDuration,\n ),\n total_duration: Math.round(script.totalDuration),\n },\n ]),\n ),\n );\n }\n }\n /* eslint-enable baseline-js/use-baseline */\n } catch (error) {\n diag.error('error building loaf scripts for INP', error);\n }\n\n return attributes;\n};\n\nconst ttfbSubPartsAttribution = (\n metric: MetricWithAttribution,\n diag: DiagLogger,\n): Attributes => {\n const attributes: Attributes = {};\n const attribution = metric.attribution as TTFBAttribution;\n const entry = attribution.navigationEntry as\n | PerformanceNavigationTiming\n | undefined;\n\n if (entry) {\n try {\n const redirect = roundClamp(entry.redirectEnd - entry.redirectStart);\n const domainLookup = roundClamp(\n entry.domainLookupEnd - entry.domainLookupStart,\n );\n const tcpConnection = roundClamp(\n entry.secureConnectionStart > 0\n ? entry.secureConnectionStart - entry.connectStart\n : entry.connectEnd - entry.connectStart,\n );\n const tlsNegotiation = roundClamp(\n entry.secureConnectionStart > 0\n ? entry.connectEnd - entry.secureConnectionStart\n : 0,\n );\n const effectiveResponseStart = Math.max(\n // @ts-expect-error 103 Early hints are not supported in all browsers\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart\n entry.finalResponseHeadersStart ?? 0,\n entry.responseStart,\n );\n const serverResponse = roundClamp(\n effectiveResponseStart - entry.requestStart,\n );\n const total = Math.round(entry.responseEnd - entry.startTime);\n const unattributed = roundClamp(\n total -\n redirect -\n domainLookup -\n tcpConnection -\n tlsNegotiation -\n serverResponse,\n );\n const prefix = KEY_MXL_WEB_VITAL_ATTRIBUTION_PREFIX;\n attributes[`${prefix}redirect`] = redirect;\n attributes[`${prefix}domainLookup`] = domainLookup;\n attributes[`${prefix}tcpConnection`] = tcpConnection;\n attributes[`${prefix}tlsNegotiation`] = tlsNegotiation;\n attributes[`${prefix}serverResponse`] = serverResponse;\n attributes[`${prefix}unattributed`] = unattributed;\n } catch (error) {\n diag.error('error computing TTFB timing breakdown', error);\n }\n } else {\n diag.debug('TTFB navigationEntry unavailable, skipping timing breakdown');\n }\n\n return attributes;\n};\n\nexport class WebVitalsInstrumentation extends MXLInstrumentationBase {\n private readonly _listeners: WebVitalListeners;\n private readonly _urlDocument: URLDocument;\n private readonly _urlAttribution: boolean;\n private readonly _pageManager: PageManager;\n private readonly _attributedPage: Record<\n Metric['name'],\n AttributedPage | undefined\n > = {\n CLS: undefined,\n FCP: undefined,\n INP: undefined,\n LCP: undefined,\n TTFB: undefined,\n };\n private _largestShiftTargetForCLS: string | undefined;\n private _listenersRegistered = false;\n private _isEnabled = false;\n\n // Instrumentation that adds an event to the session span for each web vital report\n public constructor({\n diag,\n perf,\n listeners = WEB_VITALS_ID_TO_LISTENER,\n urlDocument = window.document,\n urlAttribution = true,\n pageManager,\n }: WebVitalsInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'WebVitalsInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n this._listeners = listeners;\n this._urlDocument = urlDocument;\n this._urlAttribution = urlAttribution;\n this._pageManager = pageManager ?? page.getPageManager();\n\n if (this._config.enabled) {\n this.enable();\n }\n }\n\n public override disable(): void {\n // Web-vitals library doesn't support removing listeners, so we just pause emission\n // https://github.com/GoogleChrome/web-vitals/issues/357#issuecomment-1593439036\n this._isEnabled = false;\n this._diag.debug('WebVitalsInstrumentation disabled, pausing emission');\n }\n\n public enable(): void {\n this._isEnabled = true;\n\n // Web-vitals library doesn't support removing listeners, so only register once\n if (this._listenersRegistered) {\n this._diag.debug(\n 'WebVitalsInstrumentation listeners already registered, resuming emission',\n );\n return;\n }\n this._listenersRegistered = true;\n\n ALL_WEB_VITALS.forEach((name) => {\n this._listeners[name]?.((metric) => {\n if (!this._isEnabled) {\n return;\n }\n\n const currentSessionSpan = this.userSessionManager.getSessionPartSpan();\n\n if (!currentSessionSpan) {\n return;\n }\n\n // First thing record the time when this cb was invoked\n const metricTime = this._getTimeForMetric(metric);\n\n const attributedPage = this._getAttributedPageForMetric(metric);\n\n const attrs: Attributes = {\n [KEY_MXL_TYPE]: MXL_TYPES.WebVital,\n [ATTR_URL_FULL]: attributedPage.fullURL,\n [KEY_BROWSER_URL_FULL]: attributedPage.fullURL,\n [KEY_MXL_WEB_VITAL_NAVIGATION_TYPE]: metric.navigationType,\n [KEY_MXL_WEB_VITAL_NAME]: metric.name,\n [KEY_MXL_WEB_VITAL_RATING]: metric.rating,\n [KEY_MXL_WEB_VITAL_ID]: metric.id,\n [KEY_MXL_WEB_VITAL_DELTA]: metric.delta,\n [KEY_MXL_WEB_VITAL_VALUE]: metric.value,\n ...webVitalAttributionToReport(metric),\n ...(name === 'INP' ? loafScriptsAttribution(metric, this._diag) : {}),\n ...(name === 'TTFB'\n ? ttfbSubPartsAttribution(metric, this._diag)\n : {}),\n };\n\n // Add page attributes if route and page ID exist\n if (attributedPage.path && attributedPage.pageID) {\n attrs[KEY_MXL_PAGE_PATH] = attributedPage.path;\n attrs[KEY_MXL_PAGE_ID] = attributedPage.pageID;\n }\n\n if (attributedPage.label) {\n attrs[KEY_APP_SURFACE_LABEL] = attributedPage.label;\n }\n\n currentSessionSpan.addEvent(\n `${MXL_WEB_VITALS_PREFIX}-report-${name}`,\n attrs,\n metricTime,\n );\n });\n });\n\n if (this._urlAttribution) {\n // When these web vitals make their final report (e.g. when the listeners w/ reportAllChanges=false trigger) the\n // Document's URL at that time may not match what it was at the time the scores were last updated. Instead, listen\n // For updates to the scores and keep track of the Page information to attribute for each\n this._listeners.TTFB?.(\n () => {\n this._attributedPage.TTFB = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.FCP?.(\n () => {\n this._attributedPage.FCP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.INP?.(\n () => {\n this._attributedPage.INP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.LCP?.(\n () => {\n this._attributedPage.LCP = this._currentAttributedPage();\n },\n {\n reportAllChanges: true,\n },\n );\n this._listeners.CLS?.(\n (metric: MetricWithAttribution) => {\n const clsMetric = metric as CLSMetricWithAttribution;\n // A layout shift could cause CLS to change its rating but because the score is cumulative this might not\n // Correspond with an updated `largestShiftTarget`. Since we want to tie the attributed URL to the page that\n // The `largestShiftTarget` was on we only update the attributed URL if that target has changed\n if (\n this._largestShiftTargetForCLS !==\n clsMetric.attribution.largestShiftTarget\n ) {\n this._largestShiftTargetForCLS =\n clsMetric.attribution.largestShiftTarget;\n this._attributedPage.CLS = this._currentAttributedPage();\n }\n },\n {\n reportAllChanges: true,\n },\n );\n }\n }\n\n private _getTimeForMetric(metric: MetricWithAttribution): number {\n if (metric.name === 'CLS' && metric.attribution.largestShiftTime) {\n return this.perf.epochMillisFromOriginOffset(\n metric.attribution.largestShiftTime,\n );\n }\n\n if (metric.name === 'INP' && metric.attribution.interactionTime) {\n return this.perf.epochMillisFromOriginOffset(\n metric.attribution.interactionTime,\n );\n }\n\n return this.perf.getNowMillis();\n }\n\n private _currentAttributedPage(): AttributedPage {\n const attributed: AttributedPage = {\n fullURL: this._urlDocument.URL,\n };\n\n const currentRoute = this._pageManager.getCurrentRoute();\n const currentPageId = this._pageManager.getCurrentPageId();\n if (currentRoute && currentPageId) {\n attributed.path = currentRoute.path;\n attributed.pageID = currentPageId;\n }\n\n const pageLabel = this._pageManager.getPageLabel();\n if (pageLabel) {\n attributed.label = pageLabel;\n }\n\n return attributed;\n }\n\n private _getAttributedPageForMetric(\n metric: MetricWithAttribution,\n ): AttributedPage {\n if (metric.name === 'FCP' && this._attributedPage.FCP) {\n return this._attributedPage.FCP;\n }\n\n if (metric.name === 'TTFB' && this._attributedPage.TTFB) {\n return this._attributedPage.TTFB;\n }\n\n if (metric.name === 'INP' && this._attributedPage.INP) {\n return this._attributedPage.INP;\n }\n\n if (metric.name === 'LCP' && this._attributedPage.LCP) {\n return this._attributedPage.LCP;\n }\n\n if (\n metric.name === 'CLS' &&\n this._attributedPage.CLS &&\n metric.attribution.largestShiftTarget === this._largestShiftTargetForCLS\n ) {\n return this._attributedPage.CLS;\n }\n\n return this._currentAttributedPage();\n }\n}\n"],"mappings":";;;;;;;AA2CA,MAAM,oBAAoB,UAA4C;CACpE,MAAM,OAAO,OAAO;AACpB,QAAO,SAAS,YAAY,SAAS,YAAY,SAAS;;AAG5D,MAAM,cAAc,UAA0B,KAAK,MAAM,KAAK,IAAI,GAAG,MAAM,CAAC;AAE5E,MAAM,+BACJ,WACe;CACf,MAAM,aAAyB,EAAE;CACjC,MAAM,EAAE,gBAAgB;AAExB,KAAI,CAAC,eAAe,OAAO,gBAAgB,SACzC,QAAO;A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BAAuB,KAAK,0BAE/C,QAAO,KAAK,gBAAgB;AAG9B,SAAO,KAAK,wBAAwB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/types.ts"],"mappings":";;;;;;KASY,gBAAA,IAAoB,MAAA,EAAQ,qBAAA;AAAA,KAE5B,iBAAA,GAAoB,MAAA,CAC9B,MAAA,YACE,QAAA,EAAU,gBAAA,EAAkB,IAAA,GAAO,UAAA;AAAA,KAG3B,4BAAA;EACV,SAAA,GAAY,iBAAA;EACZ,WAAA,GAAc,WAAA;EACd,cAAA;EACA,WAAA,GAAc,WAAA;AAAA,IACZ,IAAA,CAAK,0BAAA"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/types.ts"],"mappings":";;;;;;KAQY,gBAAA,IAAoB,MAAA,EAAQ,qBAAA;AAAA,KAE5B,iBAAA,GAAoB,MAAA,CAC9B,MAAA,YACE,QAAA,EAAU,gBAAA,EAAkB,IAAA,GAAO,UAAA;AAAA,KAG3B,4BAAA;EACV,SAAA,GAAY,iBAAA;EACZ,WAAA,GAAc,WAAA;EACd,cAAA;EACA,WAAA,GAAc,WAAA;AAAA,IACZ,IAAA,CAAK,0BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/types.ts"],"mappings":";;;;;;KASY,gBAAA,IAAoB,MAAA,EAAQ,qBAAA;AAAA,KAE5B,iBAAA,GAAoB,MAAA,CAC9B,MAAA,YACE,QAAA,EAAU,gBAAA,EAAkB,IAAA,GAAO,UAAA;AAAA,KAG3B,4BAAA;EACV,SAAA,GAAY,iBAAA;EACZ,WAAA,GAAc,WAAA;EACd,cAAA;EACA,WAAA,GAAc,WAAA;AAAA,IACZ,IAAA,CAAK,0BAAA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/instrumentations/web-vitals/WebVitalsInstrumentation/types.ts"],"mappings":";;;;;;KAQY,gBAAA,IAAoB,MAAA,EAAQ,qBAAA;AAAA,KAE5B,iBAAA,GAAoB,MAAA,CAC9B,MAAA,YACE,QAAA,EAAU,gBAAA,EAAkB,IAAA,GAAO,UAAA;AAAA,KAG3B,4BAAA;EACV,SAAA,GAAY,iBAAA;EACZ,WAAA,GAAc,WAAA;EACd,cAAA;EACA,WAAA,GAAc,WAAA;AAAA,IACZ,IAAA,CAAK,0BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MXLDynamicConfigManager.cjs","names":["diag","getConfigURL","DEFAULT_CONFIG","OTEL_DEFAULT_SERVICE_NAME","LOCAL_STORAGE_REMOTE_CONFIG_KEY"],"sources":["../../../src/managers/MXLConfigManager/MXLDynamicConfigManager.ts"],"sourcesContent":["import type { DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { OTEL_DEFAULT_SERVICE_NAME } from '../../resources/webSdkResource';\nimport type { DynamicConfigManager, DynamicSDKConfig } from '../../sdk';\nimport { DEFAULT_CONFIG, LOCAL_STORAGE_REMOTE_CONFIG_KEY } from './constants';\nimport type {\n MXLDynamicConfigManagerArgs,\n RemoteConfig,\n StoredRemoteConfig,\n} from './types';\nimport { getConfigURL } from './utils';\n\nconst parseRemoteConfig = (remoteConfig: RemoteConfig): DynamicSDKConfig => {\n const parsed: DynamicSDKConfig = {\n samplingPct: remoteConfig.threshold,\n };\n\n if (remoteConfig.network_span_forwarding !== undefined) {\n parsed.networkSpansForwardingThreshold =\n remoteConfig.network_span_forwarding.pct_enabled;\n }\n\n if (\n remoteConfig.service_name !== undefined &&\n remoteConfig.service_name !== ''\n ) {\n parsed.serviceName = remoteConfig.service_name;\n }\n\n return parsed;\n};\n\nexport class MXLDynamicConfigManager implements DynamicConfigManager {\n // Set to null if appID is not provided, in that case only rely on local config\n private readonly _remoteConfigURL: string | null = null;\n private readonly _diag: DiagLogger;\n private readonly _storage: Storage;\n /** Defaults + user's `dynamicSDKConfig` / init-time merge; survives remote refresh merges. */\n private readonly _baseConfig: DynamicSDKConfig;\n\n private _sdkConfig: DynamicSDKConfig;\n private _etag: string | null = null;\n /** Non-empty `service_name` from the last persisted or fetched remote payload (if any). */\n private _remoteSourceServiceName: string | undefined;\n\n public constructor({\n appID,\n appVersion,\n deviceId,\n diag: diagParam = diag.createComponentLogger({\n namespace: 'mxl-config-manager',\n }),\n storage = window.localStorage,\n defaultConfig = {},\n mxlConfigURL,\n }: MXLDynamicConfigManagerArgs = {}) {\n if (appID && appVersion && deviceId) {\n this._remoteConfigURL = getConfigURL(\n appID,\n {\n appVersion,\n deviceId,\n // TODO: Replace with actual OS version once we start capturing it\n osVersion: '1',\n },\n mxlConfigURL,\n );\n }\n\n this._diag = diagParam;\n this._storage = storage;\n\n const storedRemoteConfig = this._getRemoteConfigFromStorage();\n\n if (storedRemoteConfig) {\n this._etag = storedRemoteConfig.etag;\n this._captureRemoteServiceName(storedRemoteConfig.config);\n }\n\n // Default config merged with any user-provided defaults; user-provided values take precedence.\n // Kept around so refreshRemoteConfig can re-merge against it instead of dropping defaults.\n this._baseConfig = {\n ...DEFAULT_CONFIG,\n ...defaultConfig,\n };\n\n this._sdkConfig = {\n ...this._baseConfig,\n // Stored remote config values will override both defaults and user-provided defaults\n ...(storedRemoteConfig\n ? parseRemoteConfig(storedRemoteConfig.config)\n : {}),\n };\n }\n\n public setConfig(config: Partial<DynamicSDKConfig>): void {\n this._sdkConfig = {\n ...this._sdkConfig,\n ...config,\n };\n }\n\n public getConfig(): DynamicSDKConfig {\n return this._sdkConfig;\n }\n\n /**\n * OpenTelemetry `service.name`: remote `service_name` wins, then explicit init `serviceName`,\n * then bootstrap {@link DynamicSDKConfig.serviceName}, then `unknown_service`.\n */\n public resolveApplicationServiceName(initServiceName?: string): string {\n const remote = this._remoteSourceServiceName?.trim();\n if (remote) {\n return remote;\n }\n const fromInit = initServiceName?.trim();\n if (fromInit) {\n return fromInit;\n }\n const fromBootstrap = this._baseConfig.serviceName?.trim();\n if (fromBootstrap) {\n return fromBootstrap;\n }\n return OTEL_DEFAULT_SERVICE_NAME;\n }\n\n private _captureRemoteServiceName(raw: RemoteConfig): void {\n if (raw.service_name === undefined) {\n return;\n }\n const sn = raw.service_name.trim();\n this._remoteSourceServiceName = sn.length > 0 ? sn : undefined;\n }\n\n // No-op if not sending data to mxl\n public async refreshRemoteConfig(): Promise<void> {\n if (!this._remoteConfigURL) {\n return;\n }\n\n try {\n const remoteConfigResponse = await this._fetchRemoteConfig(\n this._remoteConfigURL,\n );\n\n if (!remoteConfigResponse) {\n this._diag.debug('No changes in remote config, skipping update');\n return;\n }\n\n const [remoteConfig, etag] = remoteConfigResponse;\n this._captureRemoteServiceName(remoteConfig);\n this._storage.setItem(\n LOCAL_STORAGE_REMOTE_CONFIG_KEY,\n JSON.stringify({\n config: remoteConfig,\n etag,\n } as StoredRemoteConfig),\n );\n\n this._sdkConfig = {\n ...this._baseConfig,\n ...parseRemoteConfig(remoteConfig),\n };\n this._etag = etag;\n } catch (error: unknown) {\n this._diag.warn(\n `Failed to refresh remote config: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n }\n\n private _getRemoteConfigFromStorage(): StoredRemoteConfig | null {\n try {\n const configString = this._storage.getItem(\n LOCAL_STORAGE_REMOTE_CONFIG_KEY,\n );\n\n if (configString) {\n return JSON.parse(configString) as StoredRemoteConfig;\n }\n\n return null;\n } catch (error) {\n this._diag.warn(\n `Failed to parse remote config from storage: ${error instanceof Error ? error.message : String(error)}`,\n );\n\n return null;\n }\n }\n\n private async _fetchRemoteConfig(\n url: string,\n ): Promise<[RemoteConfig, string | null] | null> {\n const response = await fetch(url, {\n headers: this._etag ? { 'If-None-Match': this._etag } : {},\n });\n\n const etag = response.headers.get('etag');\n\n // Nothing changed, return null\n if (response.status === 304) {\n return null;\n }\n\n if (!response.ok) {\n this._diag.warn(\n `Failed to fetch remote config from ${url}: ${response.statusText}`,\n );\n\n return null;\n }\n\n const remoteConfig = (await response.json()) as RemoteConfig;\n\n return [remoteConfig, etag];\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,qBAAqB,iBAAiD;CAC1E,MAAM,SAA2B,EAC/B,aAAa,aAAa,WAC3B;AAED,KAAI,aAAa,4BAA4B,KAAA,EAC3C,QAAO,kCACL,aAAa,wBAAwB;AAGzC,KACE,aAAa,iBAAiB,KAAA,KAC9B,aAAa,iBAAiB,GAE9B,QAAO,cAAc,aAAa;AAGpC,QAAO;;AAGT,IAAa,0BAAb,MAAqE;CAEnE,mBAAmD;CACnD;CACA;;CAEA;CAEA;CACA,QAA+B;;CAE/B;CAEA,YAAmB,EACjB,OACA,YACA,UACA,MAAM,YAAYA,mBAAAA,KAAK,sBAAsB,EAC3C,WAAW,sBACZ,CAAC,EACF,UAAU,OAAO,cACjB,gBAAgB,EAAE,EAClB,iBAC+B,EAAE,EAAE;AACnC,MAAI,SAAS,cAAc,SACzB,MAAK,mBAAmBC,wCAAAA,aACtB,OACA;GACE;GACA;GAEA,WAAW;GACZ,EACD,aACD;AAGH,OAAK,QAAQ;AACb,OAAK,WAAW;EAEhB,MAAM,qBAAqB,KAAK,6BAA6B;AAE7D,MAAI,oBAAoB;AACtB,QAAK,QAAQ,mBAAmB;AAChC,QAAK,0BAA0B,mBAAmB,OAAO;;AAK3D,OAAK,cAAc;GACjB,GAAGC,4CAAAA;GACH,GAAG;GACJ;AAED,OAAK,aAAa;GAChB,GAAG,KAAK;GAER,GAAI,qBACA,kBAAkB,mBAAmB,OAAO,GAC5C,EAAE;GACP;;CAGH,UAAiB,QAAyC;AACxD,OAAK,aAAa;GAChB,GAAG,KAAK;GACR,GAAG;GACJ;;CAGH,YAAqC;AACnC,SAAO,KAAK;;;;;;CAOd,8BAAqC,iBAAkC;EACrE,MAAM,SAAS,KAAK,0BAA0B,MAAM;AACpD,MAAI,OACF,QAAO;EAET,MAAM,WAAW,iBAAiB,MAAM;AACxC,MAAI,SACF,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,QAAK,MAAM,KACT,sCAAsC,IAAI,IAAI,SAAS,aACxD;AAED,UAAO;;AAKT,SAAO,CAAC,MAFoB,SAAS,MAAM,EAErB,KAAK"}
1
+ {"version":3,"file":"MXLDynamicConfigManager.cjs","names":["diag","getConfigURL","DEFAULT_CONFIG","OTEL_DEFAULT_SERVICE_NAME","LOCAL_STORAGE_REMOTE_CONFIG_KEY"],"sources":["../../../src/managers/MXLConfigManager/MXLDynamicConfigManager.ts"],"sourcesContent":["import type { DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { OTEL_DEFAULT_SERVICE_NAME } from '../../resources/webSdkResource';\nimport type { DynamicConfigManager, DynamicSDKConfig } from '../../sdk/types';\nimport { DEFAULT_CONFIG, LOCAL_STORAGE_REMOTE_CONFIG_KEY } from './constants';\nimport type {\n MXLDynamicConfigManagerArgs,\n RemoteConfig,\n StoredRemoteConfig,\n} from './types';\nimport { getConfigURL } from './utils';\n\nconst parseRemoteConfig = (remoteConfig: RemoteConfig): DynamicSDKConfig => {\n const parsed: DynamicSDKConfig = {\n samplingPct: remoteConfig.threshold,\n };\n\n if (remoteConfig.network_span_forwarding !== undefined) {\n parsed.networkSpansForwardingThreshold =\n remoteConfig.network_span_forwarding.pct_enabled;\n }\n\n if (\n remoteConfig.service_name !== undefined &&\n remoteConfig.service_name !== ''\n ) {\n parsed.serviceName = remoteConfig.service_name;\n }\n\n return parsed;\n};\n\nexport class MXLDynamicConfigManager implements DynamicConfigManager {\n // Set to null if appID is not provided, in that case only rely on local config\n private readonly _remoteConfigURL: string | null = null;\n private readonly _diag: DiagLogger;\n private readonly _storage: Storage;\n /** Defaults + user's `dynamicSDKConfig` / init-time merge; survives remote refresh merges. */\n private readonly _baseConfig: DynamicSDKConfig;\n\n private _sdkConfig: DynamicSDKConfig;\n private _etag: string | null = null;\n /** Non-empty `service_name` from the last persisted or fetched remote payload (if any). */\n private _remoteSourceServiceName: string | undefined;\n\n public constructor({\n appID,\n appVersion,\n deviceId,\n diag: diagParam = diag.createComponentLogger({\n namespace: 'mxl-config-manager',\n }),\n storage = window.localStorage,\n defaultConfig = {},\n mxlConfigURL,\n }: MXLDynamicConfigManagerArgs = {}) {\n if (appID && appVersion && deviceId) {\n this._remoteConfigURL = getConfigURL(\n appID,\n {\n appVersion,\n deviceId,\n // TODO: Replace with actual OS version once we start capturing it\n osVersion: '1',\n },\n mxlConfigURL,\n );\n }\n\n this._diag = diagParam;\n this._storage = storage;\n\n const storedRemoteConfig = this._getRemoteConfigFromStorage();\n\n if (storedRemoteConfig) {\n this._etag = storedRemoteConfig.etag;\n this._captureRemoteServiceName(storedRemoteConfig.config);\n }\n\n // Default config merged with any user-provided defaults; user-provided values take precedence.\n // Kept around so refreshRemoteConfig can re-merge against it instead of dropping defaults.\n this._baseConfig = {\n ...DEFAULT_CONFIG,\n ...defaultConfig,\n };\n\n this._sdkConfig = {\n ...this._baseConfig,\n // Stored remote config values will override both defaults and user-provided defaults\n ...(storedRemoteConfig\n ? parseRemoteConfig(storedRemoteConfig.config)\n : {}),\n };\n }\n\n public setConfig(config: Partial<DynamicSDKConfig>): void {\n this._sdkConfig = {\n ...this._sdkConfig,\n ...config,\n };\n }\n\n public getConfig(): DynamicSDKConfig {\n return this._sdkConfig;\n }\n\n /**\n * OpenTelemetry `service.name`: remote `service_name` wins, then explicit init `serviceName`,\n * then bootstrap {@link DynamicSDKConfig.serviceName}, then `unknown_service`.\n */\n public resolveApplicationServiceName(initServiceName?: string): string {\n const remote = this._remoteSourceServiceName?.trim();\n if (remote) {\n return remote;\n }\n const fromInit = initServiceName?.trim();\n if (fromInit) {\n return fromInit;\n }\n const fromBootstrap = this._baseConfig.serviceName?.trim();\n if (fromBootstrap) {\n return fromBootstrap;\n }\n return OTEL_DEFAULT_SERVICE_NAME;\n }\n\n private _captureRemoteServiceName(raw: RemoteConfig): void {\n if (raw.service_name === undefined) {\n return;\n }\n const sn = raw.service_name.trim();\n this._remoteSourceServiceName = sn.length > 0 ? sn : undefined;\n }\n\n // No-op if not sending data to mxl\n public async refreshRemoteConfig(): Promise<void> {\n if (!this._remoteConfigURL) {\n return;\n }\n\n try {\n const remoteConfigResponse = await this._fetchRemoteConfig(\n this._remoteConfigURL,\n );\n\n if (!remoteConfigResponse) {\n this._diag.debug('No changes in remote config, skipping update');\n return;\n }\n\n const [remoteConfig, etag] = remoteConfigResponse;\n this._captureRemoteServiceName(remoteConfig);\n this._storage.setItem(\n LOCAL_STORAGE_REMOTE_CONFIG_KEY,\n JSON.stringify({\n config: remoteConfig,\n etag,\n } as StoredRemoteConfig),\n );\n\n this._sdkConfig = {\n ...this._baseConfig,\n ...parseRemoteConfig(remoteConfig),\n };\n this._etag = etag;\n } catch (error: unknown) {\n this._diag.warn(\n `Failed to refresh remote config: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n }\n\n private _getRemoteConfigFromStorage(): StoredRemoteConfig | null {\n try {\n const configString = this._storage.getItem(\n LOCAL_STORAGE_REMOTE_CONFIG_KEY,\n );\n\n if (configString) {\n return JSON.parse(configString) as StoredRemoteConfig;\n }\n\n return null;\n } catch (error) {\n this._diag.warn(\n `Failed to parse remote config from storage: ${error instanceof Error ? error.message : String(error)}`,\n );\n\n return null;\n }\n }\n\n private async _fetchRemoteConfig(\n url: string,\n ): Promise<[RemoteConfig, string | null] | null> {\n const response = await fetch(url, {\n headers: this._etag ? { 'If-None-Match': this._etag } : {},\n });\n\n const etag = response.headers.get('etag');\n\n // Nothing changed, return null\n if (response.status === 304) {\n return null;\n }\n\n if (!response.ok) {\n this._diag.warn(\n `Failed to fetch remote config from ${url}: ${response.statusText}`,\n );\n\n return null;\n }\n\n const remoteConfig = (await response.json()) as RemoteConfig;\n\n return [remoteConfig, etag];\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,qBAAqB,iBAAiD;CAC1E,MAAM,SAA2B,EAC/B,aAAa,aAAa,WAC3B;AAED,KAAI,aAAa,4BAA4B,KAAA,EAC3C,QAAO,kCACL,aAAa,w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,KAAK,KAAA;;CAIvD,MAAa,sBAAqC;AAChD,MAAI,CAAC,KAAK,iBACR;AAGF,MAAI;GACF,MAAM,uBAAuB,MAAM,KAAK,mBACtC,KAAK,iBACN;AAED,OAAI,CAAC,sBAAsB;AACzB,SAAK,MAAM,MAAM,+CAA+C;AAChE;;GAGF,MAAM,CAAC,cAAc,QAAQ;AAC7B,QAAK,0BAA0B,aAAa;AAC5C,QAAK,SAAS,QACZC,4CAAAA,iCACA,KAAK,UAAU;IACb,QAAQ;IACR;IACD,CAAuB,CACzB;AAED,QAAK,aAAa;IAChB,GAAG,KAAK;IACR,GAAG,kBAAkB,aAAa;IACnC;AACD,QAAK,QAAQ;WACN,OAAgB;AACvB,QAAK,MAAM,KACT,oCAAoC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GAC3F;;;CAIL,8BAAiE;AAC/D,MAAI;GACF,MAAM,eAAe,KAAK,SAAS,QACjCA,4CAAAA,gCACD;AAED,OAAI,aACF,QAAO,KAAK,MAAM,aAAa;AAGjC,UAAO;WACA,OAAO;AACd,QAAK,MAAM,KACT,+CAA+C,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACtG;AAED,UAAO;;;CAIX,MAAc,mBACZ,KAC+C;EAC/C,MAAM,WAAW,MAAM,MAAM,KAAK,EAChC,SAAS,KAAK,QAAQ,EAAE,iBAAiB,KAAK,OAAO,GAAG,EAAE,EAC3D,CAAC;EAEF,MAAM,OAAO,SAAS,QAAQ,IAAI,OAAO;AAGzC,MAAI,SAAS,WAAW,IACtB,QAAO;AAGT,MAAI,CAAC,SAAS,IAAI;AAChB,QAAK,MAAM,KACT,sCAAsC,IAAI,IAAI,SAAS,aACxD;AAED,UAAO;;AAKT,SAAO,CAAC,MAFoB,SAAS,MAAM,EAErB,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"MXLDynamicConfigManager.d.cts","names":[],"sources":["../../../src/managers/MXLConfigManager/MXLDynamicConfigManager.ts"],"mappings":";;;;cAgCa,uBAAA,YAAmC,oBAAA;EAAA,iBAE7B,gBAAA;EAAA,iBACA,KAAA;EAAA,iBACA,QAAA;EAJkB;EAAA,iBAMlB,WAAA;EAAA,QAET,UAAA;EAAA,QACA,KAAA;EAON;EAAA,QALM,wBAAA;;IAGN,KAAA;IACA,UAAA;IACA,QAAA;IACA,IAAA,EAAM,SAAA;IAGN,OAAA;IACA,aAAA;IACA;EAAA,IACC,2BAAA;EAwCI,SAAA,CAAU,MAAA,EAAQ,OAAA,CAAQ,gBAAA;EAO1B,SAAA,CAAA,GAAa,gBAAA;EA/CjB;;;;EAuDI,6BAAA,CAA8B,eAAA;EAAA,QAgB7B,yBAAA;EASK,mBAAA,CAAA,GAAuB,OAAA;EAAA,QAqC5B,2BAAA;EAAA,QAoBM,kBAAA;AAAA"}
1
+ {"version":3,"file":"MXLDynamicConfigManager.d.cts","names":[],"sources":["../../../src/managers/MXLConfigManager/MXLDynamicConfigManager.ts"],"mappings":";;;;cAgCa,uBAAA,YAAmC,oBAAA;EAAA,iBAE7B,gBAAA;EAAA,iBACA,KAAA;EAAA,iBACA,QAAA;;mBAEA,WAAA;EAAA,QAET,UAAA;EAAA,QACA,KAAA;EAQA;EAAA,QANA,wBAAA;;IAGN,KAAA;IACA,UAAA;IACA,QAAA;IACA,IAAA,EAAM,SAAA;IAGN,OAAA;IACA,aAAA;IACA;EAAA,IACC,2BAAA;EAwCI,SAAA,CAAU,MAAA,EAAQ,OAAA,CAAQ,gBAAA;EAO1B,SAAA,CAAA,GAAa,gBAAA;EAPa;;;;EAe1B,6BAAA,CAA8B,eAAA;EAAA,QAgB7B,yBAAA;EASK,mBAAA,CAAA,GAAuB,OAAA;EAAA,QAqC5B,2BAAA;EAAA,QAoBM,kBAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MXLDynamicConfigManager.d.ts","names":[],"sources":["../../../src/managers/MXLConfigManager/MXLDynamicConfigManager.ts"],"mappings":";;;;cAgCa,uBAAA,YAAmC,oBAAA;EAAA,iBAE7B,gBAAA;EAAA,iBACA,KAAA;EAAA,iBACA,QAAA;EAJkB;EAAA,iBAMlB,WAAA;EAAA,QAET,UAAA;EAAA,QACA,KAAA;EAON;EAAA,QALM,wBAAA;;IAGN,KAAA;IACA,UAAA;IACA,QAAA;IACA,IAAA,EAAM,SAAA;IAGN,OAAA;IACA,aAAA;IACA;EAAA,IACC,2BAAA;EAwCI,SAAA,CAAU,MAAA,EAAQ,OAAA,CAAQ,gBAAA;EAO1B,SAAA,CAAA,GAAa,gBAAA;EA/CjB;;;;EAuDI,6BAAA,CAA8B,eAAA;EAAA,QAgB7B,yBAAA;EASK,mBAAA,CAAA,GAAuB,OAAA;EAAA,QAqC5B,2BAAA;EAAA,QAoBM,kBAAA;AAAA"}
1
+ {"version":3,"file":"MXLDynamicConfigManager.d.ts","names":[],"sources":["../../../src/managers/MXLConfigManager/MXLDynamicConfigManager.ts"],"mappings":";;;;cAgCa,uBAAA,YAAmC,oBAAA;EAAA,iBAE7B,gBAAA;EAAA,iBACA,KAAA;EAAA,iBACA,QAAA;;mBAEA,WAAA;EAAA,QAET,UAAA;EAAA,QACA,KAAA;EAQA;EAAA,QANA,wBAAA;;IAGN,KAAA;IACA,UAAA;IACA,QAAA;IACA,IAAA,EAAM,SAAA;IAGN,OAAA;IACA,aAAA;IACA;EAAA,IACC,2BAAA;EAwCI,SAAA,CAAU,MAAA,EAAQ,OAAA,CAAQ,gBAAA;EAO1B,SAAA,CAAA,GAAa,gBAAA;EAPa;;;;EAe1B,6BAAA,CAA8B,eAAA;EAAA,QAgB7B,yBAAA;EASK,mBAAA,CAAA,GAAuB,OAAA;EAAA,QAqC5B,2BAAA;EAAA,QAoBM,kBAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MXLDynamicConfigManager.js","names":[],"sources":["../../../src/managers/MXLConfigManager/MXLDynamicConfigManager.ts"],"sourcesContent":["import type { DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { OTEL_DEFAULT_SERVICE_NAME } from '../../resources/webSdkResource';\nimport type { DynamicConfigManager, DynamicSDKConfig } from '../../sdk';\nimport { DEFAULT_CONFIG, LOCAL_STORAGE_REMOTE_CONFIG_KEY } from './constants';\nimport type {\n MXLDynamicConfigManagerArgs,\n RemoteConfig,\n StoredRemoteConfig,\n} from './types';\nimport { getConfigURL } from './utils';\n\nconst parseRemoteConfig = (remoteConfig: RemoteConfig): DynamicSDKConfig => {\n const parsed: DynamicSDKConfig = {\n samplingPct: remoteConfig.threshold,\n };\n\n if (remoteConfig.network_span_forwarding !== undefined) {\n parsed.networkSpansForwardingThreshold =\n remoteConfig.network_span_forwarding.pct_enabled;\n }\n\n if (\n remoteConfig.service_name !== undefined &&\n remoteConfig.service_name !== ''\n ) {\n parsed.serviceName = remoteConfig.service_name;\n }\n\n return parsed;\n};\n\nexport class MXLDynamicConfigManager implements DynamicConfigManager {\n // Set to null if appID is not provided, in that case only rely on local config\n private readonly _remoteConfigURL: string | null = null;\n private readonly _diag: DiagLogger;\n private readonly _storage: Storage;\n /** Defaults + user's `dynamicSDKConfig` / init-time merge; survives remote refresh merges. */\n private readonly _baseConfig: DynamicSDKConfig;\n\n private _sdkConfig: DynamicSDKConfig;\n private _etag: string | null = null;\n /** Non-empty `service_name` from the last persisted or fetched remote payload (if any). */\n private _remoteSourceServiceName: string | undefined;\n\n public constructor({\n appID,\n appVersion,\n deviceId,\n diag: diagParam = diag.createComponentLogger({\n namespace: 'mxl-config-manager',\n }),\n storage = window.localStorage,\n defaultConfig = {},\n mxlConfigURL,\n }: MXLDynamicConfigManagerArgs = {}) {\n if (appID && appVersion && deviceId) {\n this._remoteConfigURL = getConfigURL(\n appID,\n {\n appVersion,\n deviceId,\n // TODO: Replace with actual OS version once we start capturing it\n osVersion: '1',\n },\n mxlConfigURL,\n );\n }\n\n this._diag = diagParam;\n this._storage = storage;\n\n const storedRemoteConfig = this._getRemoteConfigFromStorage();\n\n if (storedRemoteConfig) {\n this._etag = storedRemoteConfig.etag;\n this._captureRemoteServiceName(storedRemoteConfig.config);\n }\n\n // Default config merged with any user-provided defaults; user-provided values take precedence.\n // Kept around so refreshRemoteConfig can re-merge against it instead of dropping defaults.\n this._baseConfig = {\n ...DEFAULT_CONFIG,\n ...defaultConfig,\n };\n\n this._sdkConfig = {\n ...this._baseConfig,\n // Stored remote config values will override both defaults and user-provided defaults\n ...(storedRemoteConfig\n ? parseRemoteConfig(storedRemoteConfig.config)\n : {}),\n };\n }\n\n public setConfig(config: Partial<DynamicSDKConfig>): void {\n this._sdkConfig = {\n ...this._sdkConfig,\n ...config,\n };\n }\n\n public getConfig(): DynamicSDKConfig {\n return this._sdkConfig;\n }\n\n /**\n * OpenTelemetry `service.name`: remote `service_name` wins, then explicit init `serviceName`,\n * then bootstrap {@link DynamicSDKConfig.serviceName}, then `unknown_service`.\n */\n public resolveApplicationServiceName(initServiceName?: string): string {\n const remote = this._remoteSourceServiceName?.trim();\n if (remote) {\n return remote;\n }\n const fromInit = initServiceName?.trim();\n if (fromInit) {\n return fromInit;\n }\n const fromBootstrap = this._baseConfig.serviceName?.trim();\n if (fromBootstrap) {\n return fromBootstrap;\n }\n return OTEL_DEFAULT_SERVICE_NAME;\n }\n\n private _captureRemoteServiceName(raw: RemoteConfig): void {\n if (raw.service_name === undefined) {\n return;\n }\n const sn = raw.service_name.trim();\n this._remoteSourceServiceName = sn.length > 0 ? sn : undefined;\n }\n\n // No-op if not sending data to mxl\n public async refreshRemoteConfig(): Promise<void> {\n if (!this._remoteConfigURL) {\n return;\n }\n\n try {\n const remoteConfigResponse = await this._fetchRemoteConfig(\n this._remoteConfigURL,\n );\n\n if (!remoteConfigResponse) {\n this._diag.debug('No changes in remote config, skipping update');\n return;\n }\n\n const [remoteConfig, etag] = remoteConfigResponse;\n this._captureRemoteServiceName(remoteConfig);\n this._storage.setItem(\n LOCAL_STORAGE_REMOTE_CONFIG_KEY,\n JSON.stringify({\n config: remoteConfig,\n etag,\n } as StoredRemoteConfig),\n );\n\n this._sdkConfig = {\n ...this._baseConfig,\n ...parseRemoteConfig(remoteConfig),\n };\n this._etag = etag;\n } catch (error: unknown) {\n this._diag.warn(\n `Failed to refresh remote config: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n }\n\n private _getRemoteConfigFromStorage(): StoredRemoteConfig | null {\n try {\n const configString = this._storage.getItem(\n LOCAL_STORAGE_REMOTE_CONFIG_KEY,\n );\n\n if (configString) {\n return JSON.parse(configString) as StoredRemoteConfig;\n }\n\n return null;\n } catch (error) {\n this._diag.warn(\n `Failed to parse remote config from storage: ${error instanceof Error ? error.message : String(error)}`,\n );\n\n return null;\n }\n }\n\n private async _fetchRemoteConfig(\n url: string,\n ): Promise<[RemoteConfig, string | null] | null> {\n const response = await fetch(url, {\n headers: this._etag ? { 'If-None-Match': this._etag } : {},\n });\n\n const etag = response.headers.get('etag');\n\n // Nothing changed, return null\n if (response.status === 304) {\n return null;\n }\n\n if (!response.ok) {\n this._diag.warn(\n `Failed to fetch remote config from ${url}: ${response.statusText}`,\n );\n\n return null;\n }\n\n const remoteConfig = (await response.json()) as RemoteConfig;\n\n return [remoteConfig, etag];\n }\n}\n"],"mappings":";;;;;AAYA,MAAM,qBAAqB,iBAAiD;CAC1E,MAAM,SAA2B,EAC/B,aAAa,aAAa,WAC3B;AAED,KAAI,aAAa,4BAA4B,KAAA,EAC3C,QAAO,kCACL,aAAa,wBAAwB;AAGzC,KACE,aAAa,iBAAiB,KAAA,KAC9B,aAAa,iBAAiB,GAE9B,QAAO,cAAc,aAAa;AAGpC,QAAO;;AAGT,IAAa,0BAAb,MAAqE;CAEnE,mBAAmD;CACnD;CACA;;CAEA;CAEA;CACA,QAA+B;;CAE/B;CAEA,YAAmB,EACjB,OACA,YACA,UACA,MAAM,YAAY,KAAK,sBAAsB,EAC3C,WAAW,sBACZ,CAAC,EACF,UAAU,OAAO,cACjB,gBAAgB,EAAE,EAClB,iBAC+B,EAAE,EAAE;AACnC,MAAI,SAAS,cAAc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D,QAAK,QAAQ;WACN,OAAgB;AACvB,QAAK,MAAM,KACT,oCAAoC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GAC3F;;;CAIL,8BAAiE;AAC/D,MAAI;GACF,MAAM,eAAe,KAAK,SAAS,QACjC,gCACD;AAED,OAAI,aACF,QAAO,KAAK,MAAM,aAAa;AAGjC,UAAO;WACA,OAAO;AACd,QAAK,MAAM,KACT,+CAA+C,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACtG;AAED,UAAO;;;CAIX,MAAc,mBACZ,KAC+C;EAC/C,MAAM,WAAW,MAAM,MAAM,KAAK,EAChC,SAAS,KAAK,QAAQ,EAAE,iBAAiB,KAAK,OAAO,GAAG,EAAE,EAC3D,CAAC;EAEF,MAAM,OAAO,SAAS,QAAQ,IAAI,OAAO;AAGzC,MAAI,SAAS,WAAW,IACtB,QAAO;AAGT,MAAI,CAAC,SAAS,IAAI;AAChB,QAAK,MAAM,KACT,sCAAsC,IAAI,IAAI,SAAS,aACxD;AAED,UAAO;;AAKT,SAAO,CAAC,MAFoB,SAAS,MAAM,EAErB,KAAK"}
1
+ {"version":3,"file":"MXLDynamicConfigManager.js","names":[],"sources":["../../../src/managers/MXLConfigManager/MXLDynamicConfigManager.ts"],"sourcesContent":["import type { DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { OTEL_DEFAULT_SERVICE_NAME } from '../../resources/webSdkResource';\nimport type { DynamicConfigManager, DynamicSDKConfig } from '../../sdk/types';\nimport { DEFAULT_CONFIG, LOCAL_STORAGE_REMOTE_CONFIG_KEY } from './constants';\nimport type {\n MXLDynamicConfigManagerArgs,\n RemoteConfig,\n StoredRemoteConfig,\n} from './types';\nimport { getConfigURL } from './utils';\n\nconst parseRemoteConfig = (remoteConfig: RemoteConfig): DynamicSDKConfig => {\n const parsed: DynamicSDKConfig = {\n samplingPct: remoteConfig.threshold,\n };\n\n if (remoteConfig.network_span_forwarding !== undefined) {\n parsed.networkSpansForwardingThreshold =\n remoteConfig.network_span_forwarding.pct_enabled;\n }\n\n if (\n remoteConfig.service_name !== undefined &&\n remoteConfig.service_name !== ''\n ) {\n parsed.serviceName = remoteConfig.service_name;\n }\n\n return parsed;\n};\n\nexport class MXLDynamicConfigManager implements DynamicConfigManager {\n // Set to null if appID is not provided, in that case only rely on local config\n private readonly _remoteConfigURL: string | null = null;\n private readonly _diag: DiagLogger;\n private readonly _storage: Storage;\n /** Defaults + user's `dynamicSDKConfig` / init-time merge; survives remote refresh merges. */\n private readonly _baseConfig: DynamicSDKConfig;\n\n private _sdkConfig: DynamicSDKConfig;\n private _etag: string | null = null;\n /** Non-empty `service_name` from the last persisted or fetched remote payload (if any). */\n private _remoteSourceServiceName: string | undefined;\n\n public constructor({\n appID,\n appVersion,\n deviceId,\n diag: diagParam = diag.createComponentLogger({\n namespace: 'mxl-config-manager',\n }),\n storage = window.localStorage,\n defaultConfig = {},\n mxlConfigURL,\n }: MXLDynamicConfigManagerArgs = {}) {\n if (appID && appVersion && deviceId) {\n this._remoteConfigURL = getConfigURL(\n appID,\n {\n appVersion,\n deviceId,\n // TODO: Replace with actual OS version once we start capturing it\n osVersion: '1',\n },\n mxlConfigURL,\n );\n }\n\n this._diag = diagParam;\n this._storage = storage;\n\n const storedRemoteConfig = this._getRemoteConfigFromStorage();\n\n if (storedRemoteConfig) {\n this._etag = storedRemoteConfig.etag;\n this._captureRemoteServiceName(storedRemoteConfig.config);\n }\n\n // Default config merged with any user-provided defaults; user-provided values take precedence.\n // Kept around so refreshRemoteConfig can re-merge against it instead of dropping defaults.\n this._baseConfig = {\n ...DEFAULT_CONFIG,\n ...defaultConfig,\n };\n\n this._sdkConfig = {\n ...this._baseConfig,\n // Stored remote config values will override both defaults and user-provided defaults\n ...(storedRemoteConfig\n ? parseRemoteConfig(storedRemoteConfig.config)\n : {}),\n };\n }\n\n public setConfig(config: Partial<DynamicSDKConfig>): void {\n this._sdkConfig = {\n ...this._sdkConfig,\n ...config,\n };\n }\n\n public getConfig(): DynamicSDKConfig {\n return this._sdkConfig;\n }\n\n /**\n * OpenTelemetry `service.name`: remote `service_name` wins, then explicit init `serviceName`,\n * then bootstrap {@link DynamicSDKConfig.serviceName}, then `unknown_service`.\n */\n public resolveApplicationServiceName(initServiceName?: string): string {\n const remote = this._remoteSourceServiceName?.trim();\n if (remote) {\n return remote;\n }\n const fromInit = initServiceName?.trim();\n if (fromInit) {\n return fromInit;\n }\n const fromBootstrap = this._baseConfig.serviceName?.trim();\n if (fromBootstrap) {\n return fromBootstrap;\n }\n return OTEL_DEFAULT_SERVICE_NAME;\n }\n\n private _captureRemoteServiceName(raw: RemoteConfig): void {\n if (raw.service_name === undefined) {\n return;\n }\n const sn = raw.service_name.trim();\n this._remoteSourceServiceName = sn.length > 0 ? sn : undefined;\n }\n\n // No-op if not sending data to mxl\n public async refreshRemoteConfig(): Promise<void> {\n if (!this._remoteConfigURL) {\n return;\n }\n\n try {\n const remoteConfigResponse = await this._fetchRemoteConfig(\n this._remoteConfigURL,\n );\n\n if (!remoteConfigResponse) {\n this._diag.debug('No changes in remote config, skipping update');\n return;\n }\n\n const [remoteConfig, etag] = remoteConfigResponse;\n this._captureRemoteServiceName(remoteConfig);\n this._storage.setItem(\n LOCAL_STORAGE_REMOTE_CONFIG_KEY,\n JSON.stringify({\n config: remoteConfig,\n etag,\n } as StoredRemoteConfig),\n );\n\n this._sdkConfig = {\n ...this._baseConfig,\n ...parseRemoteConfig(remoteConfig),\n };\n this._etag = etag;\n } catch (error: unknown) {\n this._diag.warn(\n `Failed to refresh remote config: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n }\n\n private _getRemoteConfigFromStorage(): StoredRemoteConfig | null {\n try {\n const configString = this._storage.getItem(\n LOCAL_STORAGE_REMOTE_CONFIG_KEY,\n );\n\n if (configString) {\n return JSON.parse(configString) as StoredRemoteConfig;\n }\n\n return null;\n } catch (error) {\n this._diag.warn(\n `Failed to parse remote config from storage: ${error instanceof Error ? error.message : String(error)}`,\n );\n\n return null;\n }\n }\n\n private async _fetchRemoteConfig(\n url: string,\n ): Promise<[RemoteConfig, string | null] | null> {\n const response = await fetch(url, {\n headers: this._etag ? { 'If-None-Match': this._etag } : {},\n });\n\n const etag = response.headers.get('etag');\n\n // Nothing changed, return null\n if (response.status === 304) {\n return null;\n }\n\n if (!response.ok) {\n this._diag.warn(\n `Failed to fetch remote config from ${url}: ${response.statusText}`,\n );\n\n return null;\n }\n\n const remoteConfig = (await response.json()) as RemoteConfig;\n\n return [remoteConfig, etag];\n }\n}\n"],"mappings":";;;;;AAYA,MAAM,qBAAqB,iBAAiD;CAC1E,MAAM,SAA2B,EAC/B,aAAa,aAAa,WAC3B;AAED,KAAI,aAAa,4BAA4B,KAAA,EAC3C,QAAO,kCACL,aAAa,wBAAwB;AAGzC,KACE,aAAa,iBAAiB,KAAA,KAC9B,aAAa,iBAAiB,GAE9B,QAAO,cAAc,aAAa;AAGpC,QAAO;;AAGT,IAAa,0BAAb,MAAqE;CAEnE,mBAAmD;CACnD;CACA;;CAEA;CAEA;CACA,QAA+B;;CAE/B;CAEA,YAAmB,EACjB,OACA,YACA,UACA,MAAM,YAAY,KAAK,sBAAsB,EAC3C,WAAW,sBACZ,CAAC,EACF,UAAU,OAAO,cACjB,gBAAgB,EAAE,EAClB,iBAC+B,EAAE,EAAE;AACnC,MAAI,SAAS,cAAc,SACzB,MAAK,mBAAmB,aACtB,OACA;GACE;GACA;GAEA,WAAW;GACZ,EACD,aACD;AAGH,OAAK,QAAQ;AACb,OAAK,WAAW;EAEhB,MAAM,qBAAqB,KAAK,6BAA6B;AAE7D,MAAI,oBAAoB;AACtB,QAAK,QAAQ,mBAAmB;AAChC,QAAK,0BAA0B,mBAAmB,OAAO;;AAK3D,OAAK,cAAc;GACjB,GAAG;GACH,GAAG;GACJ;AAED,OAAK,aAAa;GAChB,GAAG,KAAK;GAER,GAAI,qBACA,kBAAkB,mBAAmB,OAAO,GAC5C,EAAE;GACP;;CAGH,UA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AM,MAAM,KAAK,EAChC,SAAS,KAAK,QAAQ,EAAE,iBAAiB,KAAK,OAAO,GAAG,EAAE,EAC3D,CAAC;EAEF,MAAM,OAAO,SAAS,QAAQ,IAAI,OAAO;AAGzC,MAAI,SAAS,WAAW,IACtB,QAAO;AAGT,MAAI,CAAC,SAAS,IAAI;AAChB,QAAK,MAAM,KACT,sCAAsC,IAAI,IAAI,SAAS,aACxD;AAED,UAAO;;AAKT,SAAO,CAAC,MAFoB,SAAS,MAAM,EAErB,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","names":[],"sources":["../../../src/managers/MXLConfigManager/constants.ts"],"sourcesContent":["import type { DynamicSDKConfig } from '../../sdk';\n\nexport const DEFAULT_CONFIG: DynamicSDKConfig = {\n networkSpansForwardingThreshold: 0,\n samplingPct: 100,\n};\n\nexport const LOCAL_STORAGE_REMOTE_CONFIG_KEY = 'mxl_remote_config';\n"],"mappings":";;AAEA,MAAa,iBAAmC;CAC9C,iCAAiC;CACjC,aAAa;CACd;AAED,MAAa,kCAAkC"}
1
+ {"version":3,"file":"constants.cjs","names":[],"sources":["../../../src/managers/MXLConfigManager/constants.ts"],"sourcesContent":["import type { DynamicSDKConfig } from '../../sdk/types';\nexport const DEFAULT_CONFIG: DynamicSDKConfig = {\n networkSpansForwardingThreshold: 0,\n samplingPct: 100,\n};\n\nexport const LOCAL_STORAGE_REMOTE_CONFIG_KEY = 'mxl_remote_config';\n"],"mappings":";;AACA,MAAa,iBAAmC;CAC9C,iCAAiC;CACjC,aAAa;CACd;AAED,MAAa,kCAAkC"}
@@ -1,4 +1,5 @@
1
1
  import { DynamicSDKConfig } from "../../sdk/types.cjs";
2
+
2
3
  //#region src/managers/MXLConfigManager/constants.d.ts
3
4
  declare const DEFAULT_CONFIG: DynamicSDKConfig;
4
5
  declare const LOCAL_STORAGE_REMOTE_CONFIG_KEY = "mxl_remote_config";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","names":[],"sources":["../../../src/managers/MXLConfigManager/constants.ts"],"mappings":";;cAEa,cAAA,EAAgB,gBAAA;AAAA,cAKhB,+BAAA"}
1
+ {"version":3,"file":"constants.d.cts","names":[],"sources":["../../../src/managers/MXLConfigManager/constants.ts"],"mappings":";;;cACa,cAAA,EAAgB,gBAAA;AAAA,cAKhB,+BAAA"}
@@ -1,4 +1,5 @@
1
1
  import { DynamicSDKConfig } from "../../sdk/types.js";
2
+
2
3
  //#region src/managers/MXLConfigManager/constants.d.ts
3
4
  declare const DEFAULT_CONFIG: DynamicSDKConfig;
4
5
  declare const LOCAL_STORAGE_REMOTE_CONFIG_KEY = "mxl_remote_config";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/managers/MXLConfigManager/constants.ts"],"mappings":";;cAEa,cAAA,EAAgB,gBAAA;AAAA,cAKhB,+BAAA"}
1
+ {"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/managers/MXLConfigManager/constants.ts"],"mappings":";;;cACa,cAAA,EAAgB,gBAAA;AAAA,cAKhB,+BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../../../src/managers/MXLConfigManager/constants.ts"],"sourcesContent":["import type { DynamicSDKConfig } from '../../sdk';\n\nexport const DEFAULT_CONFIG: DynamicSDKConfig = {\n networkSpansForwardingThreshold: 0,\n samplingPct: 100,\n};\n\nexport const LOCAL_STORAGE_REMOTE_CONFIG_KEY = 'mxl_remote_config';\n"],"mappings":";AAEA,MAAa,iBAAmC;CAC9C,iCAAiC;CACjC,aAAa;CACd;AAED,MAAa,kCAAkC"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../../../src/managers/MXLConfigManager/constants.ts"],"sourcesContent":["import type { DynamicSDKConfig } from '../../sdk/types';\nexport const DEFAULT_CONFIG: DynamicSDKConfig = {\n networkSpansForwardingThreshold: 0,\n samplingPct: 100,\n};\n\nexport const LOCAL_STORAGE_REMOTE_CONFIG_KEY = 'mxl_remote_config';\n"],"mappings":";AACA,MAAa,iBAAmC;CAC9C,iCAAiC;CACjC,aAAa;CACd;AAED,MAAa,kCAAkC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/managers/MXLConfigManager/types.ts"],"mappings":";;;;UAIiB,qBAAA;EACf,SAAA;EACA,UAAA;EACA,QAAA;AAAA;AAAA,UAKe,YAAA;EACf,SAAA;EACA,uBAAA;IACE,WAAA;EAAA;EAEF,mCAAA;EAVQ;EAYR,YAAA;AAAA;AAAA,UAGe,kBAAA;EACf,MAAA,EAAQ,YAAA;EACR,IAAA;AAAA;AAAA,UAGe,2BAAA;EACf,KAAA;EACA,UAAA;EACA,QAAA;EACA,IAAA,GAAO,UAAA;EACP,OAAA,GAAU,OAAA;EACV,aAAA,GAAgB,OAAA,CAAQ,gBAAA;EACxB,YAAA;AAAA"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/managers/MXLConfigManager/types.ts"],"mappings":";;;;UAEiB,qBAAA;EACf,SAAA;EACA,UAAA;EACA,QAAA;AAAA;AAAA,UAKe,YAAA;EACf,SAAA;EACA,uBAAA;IACE,WAAA;EAAA;EAEF,mCAAA;EALe;EAOf,YAAA;AAAA;AAAA,UAGe,kBAAA;EACf,MAAA,EAAQ,YAAA;EACR,IAAA;AAAA;AAAA,UAGe,2BAAA;EACf,KAAA;EACA,UAAA;EACA,QAAA;EACA,IAAA,GAAO,UAAA;EACP,OAAA,GAAU,OAAA;EACV,aAAA,GAAgB,OAAA,CAAQ,gBAAA;EACxB,YAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/managers/MXLConfigManager/types.ts"],"mappings":";;;;UAIiB,qBAAA;EACf,SAAA;EACA,UAAA;EACA,QAAA;AAAA;AAAA,UAKe,YAAA;EACf,SAAA;EACA,uBAAA;IACE,WAAA;EAAA;EAEF,mCAAA;EAVQ;EAYR,YAAA;AAAA;AAAA,UAGe,kBAAA;EACf,MAAA,EAAQ,YAAA;EACR,IAAA;AAAA;AAAA,UAGe,2BAAA;EACf,KAAA;EACA,UAAA;EACA,QAAA;EACA,IAAA,GAAO,UAAA;EACP,OAAA,GAAU,OAAA;EACV,aAAA,GAAgB,OAAA,CAAQ,gBAAA;EACxB,YAAA;AAAA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/managers/MXLConfigManager/types.ts"],"mappings":";;;;UAEiB,qBAAA;EACf,SAAA;EACA,UAAA;EACA,QAAA;AAAA;AAAA,UAKe,YAAA;EACf,SAAA;EACA,uBAAA;IACE,WAAA;EAAA;EAEF,mCAAA;EALe;EAOf,YAAA;AAAA;AAAA,UAGe,kBAAA;EACf,MAAA,EAAQ,YAAA;EACR,IAAA;AAAA;AAAA,UAGe,2BAAA;EACf,KAAA;EACA,UAAA;EACA,QAAA;EACA,IAAA,GAAO,UAAA;EACP,OAAA,GAAU,OAAA;EACV,aAAA,GAAgB,OAAA,CAAQ,gBAAA;EACxB,YAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MXLLimitManager.cjs","names":["diag"],"sources":["../../../src/managers/MXLLimitManager/MXLLimitManager.ts"],"sourcesContent":["import type { AttributeValue, DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type { ReadableSpan } from '@opentelemetry/sdk-trace-web';\nimport type { LogSeverity } from '../../api-logs';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../constants';\nimport type {\n AttributeLimitedType,\n LengthLimitedType,\n LimitManagerInternal,\n LimitOperation,\n LimitedBreadcrumb,\n LimitedException,\n LimitedLog,\n LimitedSessionProperty,\n LimitedType,\n LogLimitedType,\n MXLLimitManagerArgs,\n MaxLimitedType,\n} from './types';\n\nconst LogSeverityToLimitType: Record<LogSeverity, LogLimitedType> = {\n error: 'error_log',\n info: 'info_log',\n warning: 'warning_log',\n};\n\nexport class MXLLimitManager implements LimitManagerInternal {\n private readonly _diag: DiagLogger;\n\n private _diagnosticCounts: Record<string, number> = {};\n private _currentCount: Record<MaxLimitedType, number> = {\n breadcrumb: 0,\n element_timing: 0,\n error_log: 0,\n exception: 0,\n info_log: 0,\n network_request: 0,\n server_timing: 0,\n session_property: 0,\n span: 0,\n user_timing_mark: 0,\n user_timing_measure: 0,\n warning_log: 0,\n };\n private readonly _maxAllowed: Record<MaxLimitedType, number>;\n private readonly _maxLength: Record<LengthLimitedType, number>;\n private readonly _maxAttributes: Record<AttributeLimitedType, number>;\n\n public constructor({\n diag: diagParam,\n maxAllowed,\n maxLength,\n maxAttributes,\n }: MXLLimitManagerArgs) {\n this._diag =\n diagParam ??\n diag.createComponentLogger({\n namespace: 'MXLLimitManager',\n });\n\n this._maxAllowed = maxAllowed;\n this._maxLength = maxLength;\n this._maxAttributes = maxAttributes;\n }\n\n private _dropIfMaxReached(type: MaxLimitedType): boolean {\n if (this._currentCount[type] >= this._maxAllowed[type]) {\n this._diag.warn(\n `disallowing ${type} because the maximum number of ${this._maxAllowed[type].toString()} has already been reached for this session`,\n );\n\n this._incrDiagnosticCount(type, 'drop');\n return true;\n }\n\n this._currentCount[type] = (this._currentCount[type] || 0) + 1;\n return false;\n }\n\n public truncateString(type: LengthLimitedType, body: string) {\n if (body.length > this._maxLength[type]) {\n this._diag.warn(\n `truncating ${type} because it is longer than ${this._maxLength[type].toString()} characters: \"${body}\"`,\n );\n\n this._incrDiagnosticCount(type, 'truncate_string');\n return body.substring(0, this._maxLength[type]);\n }\n\n return body;\n }\n\n private _truncateAttributes(\n type: AttributeLimitedType,\n attributes: Record<string, AttributeValue | undefined>,\n keyType: LengthLimitedType,\n valueType: LengthLimitedType,\n ) {\n const keys = Object.keys(attributes);\n\n if (keys.length > this._maxAttributes[type]) {\n this._diag.warn(\n `truncating ${type} attributes because there are more than ${this._maxAttributes[type].toString()} set`,\n );\n this._incrDiagnosticCount(type, 'truncate_attributes');\n }\n\n const truncatedAttributes: Record<string, AttributeValue | undefined> = {};\n\n for (let i = 0; i < Math.min(keys.length, this._maxAttributes[type]); i++) {\n const truncatedKey = this.truncateString(keyType, keys[i]);\n truncatedAttributes[truncatedKey] = this.truncateString(\n valueType,\n attributes[keys[i]]?.toString() || '',\n );\n }\n\n return truncatedAttributes;\n }\n\n public limitBreadcrumb(name: string): LimitedBreadcrumb | 'dropped' {\n if (this._dropIfMaxReached('breadcrumb')) {\n return 'dropped';\n }\n\n return {\n name: this.truncateString('breadcrumb', name),\n };\n }\n\n public limitException(\n message: string,\n attributes: Record<string, AttributeValue | undefined>,\n ): LimitedException | 'dropped' {\n if (this._dropIfMaxReached('exception')) {\n return 'dropped';\n }\n\n return {\n attributes: this._truncateAttributes(\n 'exception',\n attributes,\n 'exception_attribute_key',\n 'exception_attribute_value',\n ),\n message: this.truncateString('exception', message),\n };\n }\n\n public limitLog(\n message: string,\n severity: LogSeverity,\n attributes: Record<string, AttributeValue | undefined>,\n ): LimitedLog | 'dropped' {\n const logType = LogSeverityToLimitType[severity];\n\n if (this._dropIfMaxReached(logType)) {\n return 'dropped';\n }\n\n return {\n attributes: this._truncateAttributes(\n logType,\n attributes,\n 'log_attribute_key',\n 'log_attribute_value',\n ),\n message: this.truncateString(logType, message),\n };\n }\n\n public limitSessionProperty(\n key: string,\n value: string,\n ): LimitedSessionProperty | 'dropped' {\n if (this._dropIfMaxReached('session_property')) {\n return 'dropped';\n }\n\n return {\n key: this.truncateString('session_property_key', key),\n value: this.truncateString('session_property_value', value),\n };\n }\n\n public limitElementTimingEntry(): boolean {\n return this._dropIfMaxReached('element_timing');\n }\n\n public limitServerTimingEntry(): boolean {\n return this._dropIfMaxReached('server_timing');\n }\n\n public limitUserTimingEntry(entryType: 'mark' | 'measure'): boolean {\n return this._dropIfMaxReached(\n entryType === 'mark' ? 'user_timing_mark' : 'user_timing_measure',\n );\n }\n\n public dropReadableSpan(span: ReadableSpan): boolean {\n const type =\n span.attributes[KEY_MXL_TYPE] === MXL_TYPES.Network\n ? 'network_request'\n : 'span';\n\n return this._dropIfMaxReached(type);\n }\n\n public reset(): void {\n this._diagnosticCounts = {};\n this._currentCount = {\n breadcrumb: 0,\n element_timing: 0,\n error_log: 0,\n exception: 0,\n info_log: 0,\n network_request: 0,\n server_timing: 0,\n session_property: 0,\n span: 0,\n user_timing_mark: 0,\n user_timing_measure: 0,\n warning_log: 0,\n };\n }\n\n private _incrDiagnosticCount(type: LimitedType, operation: LimitOperation) {\n const key = `mxl.app.applied_limit.${type}.${operation}.count`;\n\n this._diagnosticCounts[key] = (this._diagnosticCounts[key] || 0) + 1;\n }\n public getDiagnosticCounts(): Record<string, number> {\n return this._diagnosticCounts;\n }\n}\n"],"mappings":";;;;;AAoBA,MAAM,yBAA8D;CAClE,OAAO;CACP,MAAM;CACN,SAAS;CACV;AAED,IAAa,kBAAb,MAA6D;CAC3D;CAEA,oBAAoD,EAAE;CACtD,gBAAwD;EACtD,YAAY;EACZ,gBAAgB;EAChB,WAAW;EACX,WAAW;EACX,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,kBAAkB;EAClB,MAAM;EACN,kBAAkB;EAClB,qBAAqB;EACrB,aAAa;EACd;CACD;CACA;CACA;CAEA,YAAmB,EACjB,MAAM,WACN,YACA,WACA,iBACsB;AACtB,OAAK,QACH,aACAA,mBAAAA,KAAK,sBAAsB,EACzB,WAAW,mBACZ,CAAC;AAEJ,OAAK,cAAc;AACnB,OAAK,aAAa;AAClB,OAAK,iBAAiB;;CAGxB,kBAA0B,MAA+B;AACvD,MAAI,KAAK,cAAc,SAAS,KAAK,YAAY,OAAO;AACtD,QAAK,MAAM,KACT,eAAe,KAAK,iCAAiC,KAAK,YAAY,MAAM,UAAU,CAAC,4CACxF;AAED,QAAK,qBAAqB,MAAM,OAAO;AACvC,UAAO;;AAGT,OAAK,cAAc,SAAS,KAAK,cAAc,SAAS,KAAK;AAC7D,SAAO;;CAGT,eAAsB,MAAyB,MAAc;AAC3D,MAAI,KAAK,SAAS,KAAK,WAAW,OAAO;AACvC,QAAK,MAAM,KACT,cAAc,KA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AK,eAAe,wBAAwB,IAAI;GACrD,OAAO,KAAK,eAAe,0BAA0B,MAAM;GAC5D;;CAGH,0BAA0C;AACxC,SAAO,KAAK,kBAAkB,iBAAiB;;CAGjD,yBAAyC;AACvC,SAAO,KAAK,kBAAkB,gBAAgB;;CAGhD,qBAA4B,WAAwC;AAClE,SAAO,KAAK,kBACV,cAAc,SAAS,qBAAqB,sBAC7C;;CAGH,iBAAwB,MAA6B;EACnD,MAAM,OACJ,KAAK,WAAA,gBAAA,yBACD,oBACA;AAEN,SAAO,KAAK,kBAAkB,KAAK;;CAGrC,QAAqB;AACnB,OAAK,oBAAoB,EAAE;AAC3B,OAAK,gBAAgB;GACnB,YAAY;GACZ,gBAAgB;GAChB,WAAW;GACX,WAAW;GACX,UAAU;GACV,iBAAiB;GACjB,eAAe;GACf,kBAAkB;GAClB,MAAM;GACN,kBAAkB;GAClB,qBAAqB;GACrB,aAAa;GACd;;CAGH,qBAA6B,MAAmB,WAA2B;EACzE,MAAM,MAAM,yBAAyB,KAAK,GAAG,UAAU;AAEvD,OAAK,kBAAkB,QAAQ,KAAK,kBAAkB,QAAQ,KAAK;;CAErE,sBAAqD;AACnD,SAAO,KAAK"}
1
+ {"version":3,"file":"MXLLimitManager.cjs","names":["diag"],"sources":["../../../src/managers/MXLLimitManager/MXLLimitManager.ts"],"sourcesContent":["import type { AttributeValue, DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type { ReadableSpan } from '@opentelemetry/sdk-trace-web';\nimport type { LogSeverity } from '../../api-logs/manager/types';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../constants/attributes';\nimport type {\n AttributeLimitedType,\n LengthLimitedType,\n LimitManagerInternal,\n LimitOperation,\n LimitedBreadcrumb,\n LimitedException,\n LimitedLog,\n LimitedSessionProperty,\n LimitedType,\n LogLimitedType,\n MXLLimitManagerArgs,\n MaxLimitedType,\n} from './types';\n\nconst LogSeverityToLimitType: Record<LogSeverity, LogLimitedType> = {\n error: 'error_log',\n info: 'info_log',\n warning: 'warning_log',\n};\n\nexport class MXLLimitManager implements LimitManagerInternal {\n private readonly _diag: DiagLogger;\n\n private _diagnosticCounts: Record<string, number> = {};\n private _currentCount: Record<MaxLimitedType, number> = {\n breadcrumb: 0,\n element_timing: 0,\n error_log: 0,\n exception: 0,\n info_log: 0,\n network_request: 0,\n server_timing: 0,\n session_property: 0,\n span: 0,\n user_timing_mark: 0,\n user_timing_measure: 0,\n warning_log: 0,\n };\n private readonly _maxAllowed: Record<MaxLimitedType, number>;\n private readonly _maxLength: Record<LengthLimitedType, number>;\n private readonly _maxAttributes: Record<AttributeLimitedType, number>;\n\n public constructor({\n diag: diagParam,\n maxAllowed,\n maxLength,\n maxAttributes,\n }: MXLLimitManagerArgs) {\n this._diag =\n diagParam ??\n diag.createComponentLogger({\n namespace: 'MXLLimitManager',\n });\n\n this._maxAllowed = maxAllowed;\n this._maxLength = maxLength;\n this._maxAttributes = maxAttributes;\n }\n\n private _dropIfMaxReached(type: MaxLimitedType): boolean {\n if (this._currentCount[type] >= this._maxAllowed[type]) {\n this._diag.warn(\n `disallowing ${type} because the maximum number of ${this._maxAllowed[type].toString()} has already been reached for this session`,\n );\n\n this._incrDiagnosticCount(type, 'drop');\n return true;\n }\n\n this._currentCount[type] = (this._currentCount[type] || 0) + 1;\n return false;\n }\n\n public truncateString(type: LengthLimitedType, body: string) {\n if (body.length > this._maxLength[type]) {\n this._diag.warn(\n `truncating ${type} because it is longer than ${this._maxLength[type].toString()} characters: \"${body}\"`,\n );\n\n this._incrDiagnosticCount(type, 'truncate_string');\n return body.substring(0, this._maxLength[type]);\n }\n\n return body;\n }\n\n private _truncateAttributes(\n type: AttributeLimitedType,\n attributes: Record<string, AttributeValue | undefined>,\n keyType: LengthLimitedType,\n valueType: LengthLimitedType,\n ) {\n const keys = Object.keys(attributes);\n\n if (keys.length > this._maxAttributes[type]) {\n this._diag.warn(\n `truncating ${type} attributes because there are more than ${this._maxAttributes[type].toString()} set`,\n );\n this._incrDiagnosticCount(type, 'truncate_attributes');\n }\n\n const truncatedAttributes: Record<string, AttributeValue | undefined> = {};\n\n for (let i = 0; i < Math.min(keys.length, this._maxAttributes[type]); i++) {\n const truncatedKey = this.truncateString(keyType, keys[i]);\n truncatedAttributes[truncatedKey] = this.truncateString(\n valueType,\n attributes[keys[i]]?.toString() || '',\n );\n }\n\n return truncatedAttributes;\n }\n\n public limitBreadcrumb(name: string): LimitedBreadcrumb | 'dropped' {\n if (this._dropIfMaxReached('breadcrumb')) {\n return 'dropped';\n }\n\n return {\n name: this.truncateString('breadcrumb', name),\n };\n }\n\n public limitException(\n message: string,\n attributes: Record<string, AttributeValue | undefined>,\n ): LimitedException | 'dropped' {\n if (this._dropIfMaxReached('exception')) {\n return 'dropped';\n }\n\n return {\n attributes: this._truncateAttributes(\n 'exception',\n attributes,\n 'exception_attribute_key',\n 'exception_attribute_value',\n ),\n message: this.truncateString('exception', message),\n };\n }\n\n public limitLog(\n message: string,\n severity: LogSeverity,\n attributes: Record<string, AttributeValue | undefined>,\n ): LimitedLog | 'dropped' {\n const logType = LogSeverityToLimitType[severity];\n\n if (this._dropIfMaxReached(logType)) {\n return 'dropped';\n }\n\n return {\n attributes: this._truncateAttributes(\n logType,\n attributes,\n 'log_attribute_key',\n 'log_attribute_value',\n ),\n message: this.truncateString(logType, message),\n };\n }\n\n public limitSessionProperty(\n key: string,\n value: string,\n ): LimitedSessionProperty | 'dropped' {\n if (this._dropIfMaxReached('session_property')) {\n return 'dropped';\n }\n\n return {\n key: this.truncateString('session_property_key', key),\n value: this.truncateString('session_property_value', value),\n };\n }\n\n public limitElementTimingEntry(): boolean {\n return this._dropIfMaxReached('element_timing');\n }\n\n public limitServerTimingEntry(): boolean {\n return this._dropIfMaxReached('server_timing');\n }\n\n public limitUserTimingEntry(entryType: 'mark' | 'measure'): boolean {\n return this._dropIfMaxReached(\n entryType === 'mark' ? 'user_timing_mark' : 'user_timing_measure',\n );\n }\n\n public dropReadableSpan(span: ReadableSpan): boolean {\n const type =\n span.attributes[KEY_MXL_TYPE] === MXL_TYPES.Network\n ? 'network_request'\n : 'span';\n\n return this._dropIfMaxReached(type);\n }\n\n public reset(): void {\n this._diagnosticCounts = {};\n this._currentCount = {\n breadcrumb: 0,\n element_timing: 0,\n error_log: 0,\n exception: 0,\n info_log: 0,\n network_request: 0,\n server_timing: 0,\n session_property: 0,\n span: 0,\n user_timing_mark: 0,\n user_timing_measure: 0,\n warning_log: 0,\n };\n }\n\n private _incrDiagnosticCount(type: LimitedType, operation: LimitOperation) {\n const key = `mxl.app.applied_limit.${type}.${operation}.count`;\n\n this._diagnosticCounts[key] = (this._diagnosticCounts[key] || 0) + 1;\n }\n public getDiagnosticCounts(): Record<string, number> {\n return this._diagnosticCounts;\n }\n}\n"],"mappings":";;;;;AAoBA,MAAM,yBAA8D;CAClE,OAAO;CACP,MAAM;CACN,SAAS;CACV;AAED,IAAa,kBAAb,MAA6D;CAC3D;CAEA,oBAAoD,EAAE;CACtD,gBAAwD;EACtD,YAAY;EACZ,gBAAgB;EAChB,WAAW;EACX,WAAW;EACX,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,kBAAkB;EAClB,MAAM;EACN,kBAAkB;EAClB,qBAAqB;EACrB,aAAa;EACd;CACD;CACA;CACA;CAEA,YAAmB,EACjB,MAAM,WACN,YACA,WACA,iBACsB;AACtB,OAAK,QACH,aACAA,mBAAAA,KAAK,sBAAsB,EACzB,WAAW,mBACZ,CAAC;AAEJ,OAAK,cAAc;AACnB,OAAK,aAAa;AAClB,OAAK,iBAAiB;;CAGxB,kBAA0B,MAA+B;AACvD,MAAI,KAAK,cAAc,SAAS,KAAK,YAAY,OAAO;AACtD,QAAK,MAAM,KACT,eAAe,KAAK,iCAAiC,KAAK,YAAY,MAAM,UAAU,CAAC,4CACxF;AAED,QAAK,qBAAqB,MAAM,OAAO;AACvC,UAAO;;AAGT,OAAK,cAAc,SAAS,KAAK,cAAc,SAAS,KAAK;AAC7D,SAA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GAC/C;;CAGH,qBACE,KACA,OACoC;AACpC,MAAI,KAAK,kBAAkB,mBAAmB,CAC5C,QAAO;AAGT,SAAO;GACL,KAAK,KAAK,eAAe,wBAAwB,IAAI;GACrD,OAAO,KAAK,eAAe,0BAA0B,MAAM;GAC5D;;CAGH,0BAA0C;AACxC,SAAO,KAAK,kBAAkB,iBAAiB;;CAGjD,yBAAyC;AACvC,SAAO,KAAK,kBAAkB,gBAAgB;;CAGhD,qBAA4B,WAAwC;AAClE,SAAO,KAAK,kBACV,cAAc,SAAS,qBAAqB,sBAC7C;;CAGH,iBAAwB,MAA6B;EACnD,MAAM,OACJ,KAAK,WAAA,gBAAA,yBACD,oBACA;AAEN,SAAO,KAAK,kBAAkB,KAAK;;CAGrC,QAAqB;AACnB,OAAK,oBAAoB,EAAE;AAC3B,OAAK,gBAAgB;GACnB,YAAY;GACZ,gBAAgB;GAChB,WAAW;GACX,WAAW;GACX,UAAU;GACV,iBAAiB;GACjB,eAAe;GACf,kBAAkB;GAClB,MAAM;GACN,kBAAkB;GAClB,qBAAqB;GACrB,aAAa;GACd;;CAGH,qBAA6B,MAAmB,WAA2B;EACzE,MAAM,MAAM,yBAAyB,KAAK,GAAG,UAAU;AAEvD,OAAK,kBAAkB,QAAQ,KAAK,kBAAkB,QAAQ,KAAK;;CAErE,sBAAqD;AACnD,SAAO,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"MXLLimitManager.js","names":[],"sources":["../../../src/managers/MXLLimitManager/MXLLimitManager.ts"],"sourcesContent":["import type { AttributeValue, DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type { ReadableSpan } from '@opentelemetry/sdk-trace-web';\nimport type { LogSeverity } from '../../api-logs';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../constants';\nimport type {\n AttributeLimitedType,\n LengthLimitedType,\n LimitManagerInternal,\n LimitOperation,\n LimitedBreadcrumb,\n LimitedException,\n LimitedLog,\n LimitedSessionProperty,\n LimitedType,\n LogLimitedType,\n MXLLimitManagerArgs,\n MaxLimitedType,\n} from './types';\n\nconst LogSeverityToLimitType: Record<LogSeverity, LogLimitedType> = {\n error: 'error_log',\n info: 'info_log',\n warning: 'warning_log',\n};\n\nexport class MXLLimitManager implements LimitManagerInternal {\n private readonly _diag: DiagLogger;\n\n private _diagnosticCounts: Record<string, number> = {};\n private _currentCount: Record<MaxLimitedType, number> = {\n breadcrumb: 0,\n element_timing: 0,\n error_log: 0,\n exception: 0,\n info_log: 0,\n network_request: 0,\n server_timing: 0,\n session_property: 0,\n span: 0,\n user_timing_mark: 0,\n user_timing_measure: 0,\n warning_log: 0,\n };\n private readonly _maxAllowed: Record<MaxLimitedType, number>;\n private readonly _maxLength: Record<LengthLimitedType, number>;\n private readonly _maxAttributes: Record<AttributeLimitedType, number>;\n\n public constructor({\n diag: diagParam,\n maxAllowed,\n maxLength,\n maxAttributes,\n }: MXLLimitManagerArgs) {\n this._diag =\n diagParam ??\n diag.createComponentLogger({\n namespace: 'MXLLimitManager',\n });\n\n this._maxAllowed = maxAllowed;\n this._maxLength = maxLength;\n this._maxAttributes = maxAttributes;\n }\n\n private _dropIfMaxReached(type: MaxLimitedType): boolean {\n if (this._currentCount[type] >= this._maxAllowed[type]) {\n this._diag.warn(\n `disallowing ${type} because the maximum number of ${this._maxAllowed[type].toString()} has already been reached for this session`,\n );\n\n this._incrDiagnosticCount(type, 'drop');\n return true;\n }\n\n this._currentCount[type] = (this._currentCount[type] || 0) + 1;\n return false;\n }\n\n public truncateString(type: LengthLimitedType, body: string) {\n if (body.length > this._maxLength[type]) {\n this._diag.warn(\n `truncating ${type} because it is longer than ${this._maxLength[type].toString()} characters: \"${body}\"`,\n );\n\n this._incrDiagnosticCount(type, 'truncate_string');\n return body.substring(0, this._maxLength[type]);\n }\n\n return body;\n }\n\n private _truncateAttributes(\n type: AttributeLimitedType,\n attributes: Record<string, AttributeValue | undefined>,\n keyType: LengthLimitedType,\n valueType: LengthLimitedType,\n ) {\n const keys = Object.keys(attributes);\n\n if (keys.length > this._maxAttributes[type]) {\n this._diag.warn(\n `truncating ${type} attributes because there are more than ${this._maxAttributes[type].toString()} set`,\n );\n this._incrDiagnosticCount(type, 'truncate_attributes');\n }\n\n const truncatedAttributes: Record<string, AttributeValue | undefined> = {};\n\n for (let i = 0; i < Math.min(keys.length, this._maxAttributes[type]); i++) {\n const truncatedKey = this.truncateString(keyType, keys[i]);\n truncatedAttributes[truncatedKey] = this.truncateString(\n valueType,\n attributes[keys[i]]?.toString() || '',\n );\n }\n\n return truncatedAttributes;\n }\n\n public limitBreadcrumb(name: string): LimitedBreadcrumb | 'dropped' {\n if (this._dropIfMaxReached('breadcrumb')) {\n return 'dropped';\n }\n\n return {\n name: this.truncateString('breadcrumb', name),\n };\n }\n\n public limitException(\n message: string,\n attributes: Record<string, AttributeValue | undefined>,\n ): LimitedException | 'dropped' {\n if (this._dropIfMaxReached('exception')) {\n return 'dropped';\n }\n\n return {\n attributes: this._truncateAttributes(\n 'exception',\n attributes,\n 'exception_attribute_key',\n 'exception_attribute_value',\n ),\n message: this.truncateString('exception', message),\n };\n }\n\n public limitLog(\n message: string,\n severity: LogSeverity,\n attributes: Record<string, AttributeValue | undefined>,\n ): LimitedLog | 'dropped' {\n const logType = LogSeverityToLimitType[severity];\n\n if (this._dropIfMaxReached(logType)) {\n return 'dropped';\n }\n\n return {\n attributes: this._truncateAttributes(\n logType,\n attributes,\n 'log_attribute_key',\n 'log_attribute_value',\n ),\n message: this.truncateString(logType, message),\n };\n }\n\n public limitSessionProperty(\n key: string,\n value: string,\n ): LimitedSessionProperty | 'dropped' {\n if (this._dropIfMaxReached('session_property')) {\n return 'dropped';\n }\n\n return {\n key: this.truncateString('session_property_key', key),\n value: this.truncateString('session_property_value', value),\n };\n }\n\n public limitElementTimingEntry(): boolean {\n return this._dropIfMaxReached('element_timing');\n }\n\n public limitServerTimingEntry(): boolean {\n return this._dropIfMaxReached('server_timing');\n }\n\n public limitUserTimingEntry(entryType: 'mark' | 'measure'): boolean {\n return this._dropIfMaxReached(\n entryType === 'mark' ? 'user_timing_mark' : 'user_timing_measure',\n );\n }\n\n public dropReadableSpan(span: ReadableSpan): boolean {\n const type =\n span.attributes[KEY_MXL_TYPE] === MXL_TYPES.Network\n ? 'network_request'\n : 'span';\n\n return this._dropIfMaxReached(type);\n }\n\n public reset(): void {\n this._diagnosticCounts = {};\n this._currentCount = {\n breadcrumb: 0,\n element_timing: 0,\n error_log: 0,\n exception: 0,\n info_log: 0,\n network_request: 0,\n server_timing: 0,\n session_property: 0,\n span: 0,\n user_timing_mark: 0,\n user_timing_measure: 0,\n warning_log: 0,\n };\n }\n\n private _incrDiagnosticCount(type: LimitedType, operation: LimitOperation) {\n const key = `mxl.app.applied_limit.${type}.${operation}.count`;\n\n this._diagnosticCounts[key] = (this._diagnosticCounts[key] || 0) + 1;\n }\n public getDiagnosticCounts(): Record<string, number> {\n return this._diagnosticCounts;\n }\n}\n"],"mappings":";;;AAoBA,MAAM,yBAA8D;CAClE,OAAO;CACP,MAAM;CACN,SAAS;CACV;AAED,IAAa,kBAAb,MAA6D;CAC3D;CAEA,oBAAoD,EAAE;CACtD,gBAAwD;EACtD,YAAY;EACZ,gBAAgB;EAChB,WAAW;EACX,WAAW;EACX,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,kBAAkB;EAClB,MAAM;EACN,kBAAkB;EAClB,qBAAqB;EACrB,aAAa;EACd;CACD;CACA;CACA;CAEA,YAAmB,EACjB,MAAM,WACN,YACA,WACA,iBACsB;AACtB,OAAK,QACH,aACA,KAAK,sBAAsB,EACzB,WAAW,mBACZ,CAAC;AAEJ,OAAK,cAAc;AACnB,OAAK,aAAa;AAClB,OAAK,iBAAiB;;CAGxB,kBAA0B,MAA+B;AACvD,MAAI,KAAK,cAAc,SAAS,KAAK,YAAY,OAAO;AACtD,QAAK,MAAM,KACT,eAAe,KAAK,iCAAiC,KAAK,YAAY,MAAM,UAAU,CAAC,4CACxF;AAED,QAAK,qBA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T,SAAO;GACL,YAAY,KAAK,oBACf,SACA,YACA,qBACA,sBACD;GACD,SAAS,KAAK,eAAe,SAAS,QAAQ;GAC/C;;CAGH,qBACE,KACA,OACoC;AACpC,MAAI,KAAK,kBAAkB,mBAAmB,CAC5C,QAAO;AAGT,SAAO;GACL,KAAK,KAAK,eAAe,wBAAwB,IAAI;GACrD,OAAO,KAAK,eAAe,0BAA0B,MAAM;GAC5D;;CAGH,0BAA0C;AACxC,SAAO,KAAK,kBAAkB,iBAAiB;;CAGjD,yBAAyC;AACvC,SAAO,KAAK,kBAAkB,gBAAgB;;CAGhD,qBAA4B,WAAwC;AAClE,SAAO,KAAK,kBACV,cAAc,SAAS,qBAAqB,sBAC7C;;CAGH,iBAAwB,MAA6B;EACnD,MAAM,OACJ,KAAK,WAAA,gBAAA,yBACD,oBACA;AAEN,SAAO,KAAK,kBAAkB,KAAK;;CAGrC,QAAqB;AACnB,OAAK,oBAAoB,EAAE;AAC3B,OAAK,gBAAgB;GACnB,YAAY;GACZ,gBAAgB;GAChB,WAAW;GACX,WAAW;GACX,UAAU;GACV,iBAAiB;GACjB,eAAe;GACf,kBAAkB;GAClB,MAAM;GACN,kBAAkB;GAClB,qBAAqB;GACrB,aAAa;GACd;;CAGH,qBAA6B,MAAmB,WAA2B;EACzE,MAAM,MAAM,yBAAyB,KAAK,GAAG,UAAU;AAEvD,OAAK,kBAAkB,QAAQ,KAAK,kBAAkB,QAAQ,KAAK;;CAErE,sBAAqD;AACnD,SAAO,KAAK"}
1
+ {"version":3,"file":"MXLLimitManager.js","names":[],"sources":["../../../src/managers/MXLLimitManager/MXLLimitManager.ts"],"sourcesContent":["import type { AttributeValue, DiagLogger } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type { ReadableSpan } from '@opentelemetry/sdk-trace-web';\nimport type { LogSeverity } from '../../api-logs/manager/types';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../constants/attributes';\nimport type {\n AttributeLimitedType,\n LengthLimitedType,\n LimitManagerInternal,\n LimitOperation,\n LimitedBreadcrumb,\n LimitedException,\n LimitedLog,\n LimitedSessionProperty,\n LimitedType,\n LogLimitedType,\n MXLLimitManagerArgs,\n MaxLimitedType,\n} from './types';\n\nconst LogSeverityToLimitType: Record<LogSeverity, LogLimitedType> = {\n error: 'error_log',\n info: 'info_log',\n warning: 'warning_log',\n};\n\nexport class MXLLimitManager implements LimitManagerInternal {\n private readonly _diag: DiagLogger;\n\n private _diagnosticCounts: Record<string, number> = {};\n private _currentCount: Record<MaxLimitedType, number> = {\n breadcrumb: 0,\n element_timing: 0,\n error_log: 0,\n exception: 0,\n info_log: 0,\n network_request: 0,\n server_timing: 0,\n session_property: 0,\n span: 0,\n user_timing_mark: 0,\n user_timing_measure: 0,\n warning_log: 0,\n };\n private readonly _maxAllowed: Record<MaxLimitedType, number>;\n private readonly _maxLength: Record<LengthLimitedType, number>;\n private readonly _maxAttributes: Record<AttributeLimitedType, number>;\n\n public constructor({\n diag: diagParam,\n maxAllowed,\n maxLength,\n maxAttributes,\n }: MXLLimitManagerArgs) {\n this._diag =\n diagParam ??\n diag.createComponentLogger({\n namespace: 'MXLLimitManager',\n });\n\n this._maxAllowed = maxAllowed;\n this._maxLength = maxLength;\n this._maxAttributes = maxAttributes;\n }\n\n private _dropIfMaxReached(type: MaxLimitedType): boolean {\n if (this._currentCount[type] >= this._maxAllowed[type]) {\n this._diag.warn(\n `disallowing ${type} because the maximum number of ${this._maxAllowed[type].toString()} has already been reached for this session`,\n );\n\n this._incrDiagnosticCount(type, 'drop');\n return true;\n }\n\n this._currentCount[type] = (this._currentCount[type] || 0) + 1;\n return false;\n }\n\n public truncateString(type: LengthLimitedType, body: string) {\n if (body.length > this._maxLength[type]) {\n this._diag.warn(\n `truncating ${type} because it is longer than ${this._maxLength[type].toString()} characters: \"${body}\"`,\n );\n\n this._incrDiagnosticCount(type, 'truncate_string');\n return body.substring(0, this._maxLength[type]);\n }\n\n return body;\n }\n\n private _truncateAttributes(\n type: AttributeLimitedType,\n attributes: Record<string, AttributeValue | undefined>,\n keyType: LengthLimitedType,\n valueType: LengthLimitedType,\n ) {\n const keys = Object.keys(attributes);\n\n if (keys.length > this._maxAttributes[type]) {\n this._diag.warn(\n `truncating ${type} attributes because there are more than ${this._maxAttributes[type].toString()} set`,\n );\n this._incrDiagnosticCount(type, 'truncate_attributes');\n }\n\n const truncatedAttributes: Record<string, AttributeValue | undefined> = {};\n\n for (let i = 0; i < Math.min(keys.length, this._maxAttributes[type]); i++) {\n const truncatedKey = this.truncateString(keyType, keys[i]);\n truncatedAttributes[truncatedKey] = this.truncateString(\n valueType,\n attributes[keys[i]]?.toString() || '',\n );\n }\n\n return truncatedAttributes;\n }\n\n public limitBreadcrumb(name: string): LimitedBreadcrumb | 'dropped' {\n if (this._dropIfMaxReached('breadcrumb')) {\n return 'dropped';\n }\n\n return {\n name: this.truncateString('breadcrumb', name),\n };\n }\n\n public limitException(\n message: string,\n attributes: Record<string, AttributeValue | undefined>,\n ): LimitedException | 'dropped' {\n if (this._dropIfMaxReached('exception')) {\n return 'dropped';\n }\n\n return {\n attributes: this._truncateAttributes(\n 'exception',\n attributes,\n 'exception_attribute_key',\n 'exception_attribute_value',\n ),\n message: this.truncateString('exception', message),\n };\n }\n\n public limitLog(\n message: string,\n severity: LogSeverity,\n attributes: Record<string, AttributeValue | undefined>,\n ): LimitedLog | 'dropped' {\n const logType = LogSeverityToLimitType[severity];\n\n if (this._dropIfMaxReached(logType)) {\n return 'dropped';\n }\n\n return {\n attributes: this._truncateAttributes(\n logType,\n attributes,\n 'log_attribute_key',\n 'log_attribute_value',\n ),\n message: this.truncateString(logType, message),\n };\n }\n\n public limitSessionProperty(\n key: string,\n value: string,\n ): LimitedSessionProperty | 'dropped' {\n if (this._dropIfMaxReached('session_property')) {\n return 'dropped';\n }\n\n return {\n key: this.truncateString('session_property_key', key),\n value: this.truncateString('session_property_value', value),\n };\n }\n\n public limitElementTimingEntry(): boolean {\n return this._dropIfMaxReached('element_timing');\n }\n\n public limitServerTimingEntry(): boolean {\n return this._dropIfMaxReached('server_timing');\n }\n\n public limitUserTimingEntry(entryType: 'mark' | 'measure'): boolean {\n return this._dropIfMaxReached(\n entryType === 'mark' ? 'user_timing_mark' : 'user_timing_measure',\n );\n }\n\n public dropReadableSpan(span: ReadableSpan): boolean {\n const type =\n span.attributes[KEY_MXL_TYPE] === MXL_TYPES.Network\n ? 'network_request'\n : 'span';\n\n return this._dropIfMaxReached(type);\n }\n\n public reset(): void {\n this._diagnosticCounts = {};\n this._currentCount = {\n breadcrumb: 0,\n element_timing: 0,\n error_log: 0,\n exception: 0,\n info_log: 0,\n network_request: 0,\n server_timing: 0,\n session_property: 0,\n span: 0,\n user_timing_mark: 0,\n user_timing_measure: 0,\n warning_log: 0,\n };\n }\n\n private _incrDiagnosticCount(type: LimitedType, operation: LimitOperation) {\n const key = `mxl.app.applied_limit.${type}.${operation}.count`;\n\n this._diagnosticCounts[key] = (this._diagnosticCounts[key] || 0) + 1;\n }\n public getDiagnosticCounts(): Record<string, number> {\n return this._diagnosticCounts;\n }\n}\n"],"mappings":";;;AAoBA,MAAM,yBAA8D;CAClE,OAAO;CACP,MAAM;CACN,SAAS;CACV;AAED,IAAa,kBAAb,MAA6D;CAC3D;CAEA,oBAAoD,EAAE;CACtD,gBAAwD;EACtD,YAAY;EACZ,gBAAgB;EAChB,WAAW;EACX,WAAW;EACX,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,kBAAkB;EAClB,MAAM;EACN,kBAAkB;EAClB,qBAAqB;EACrB,aAAa;EACd;CACD;CACA;CACA;CAEA,YAAmB,EACjB,MAAM,WACN,YACA,WACA,iBACsB;AACtB,OAAK,QACH,aACA,KAAK,sBAAsB,EACzB,WAAW,mBACZ,CAAC;AAEJ,OAAK,cAAc;AACnB,OAAK,aAAa;AAClB,OAAK,iBAAiB;;CAGxB,kBAA0B,MAA+B;AACvD,MAAI,KAAK,cAAc,SAAS,KAAK,YAAY,OAAO;AACtD,QA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ACA,YACwB;EACxB,MAAM,UAAU,uBAAuB;AAEvC,MAAI,KAAK,kBAAkB,QAAQ,CACjC,QAAO;AAGT,SAAO;GACL,YAAY,KAAK,oBACf,SACA,YACA,qBACA,sBACD;GACD,SAAS,KAAK,eAAe,SAAS,QAAQ;GAC/C;;CAGH,qBACE,KACA,OACoC;AACpC,MAAI,KAAK,kBAAkB,mBAAmB,CAC5C,QAAO;AAGT,SAAO;GACL,KAAK,KAAK,eAAe,wBAAwB,IAAI;GACrD,OAAO,KAAK,eAAe,0BAA0B,MAAM;GAC5D;;CAGH,0BAA0C;AACxC,SAAO,KAAK,kBAAkB,iBAAiB;;CAGjD,yBAAyC;AACvC,SAAO,KAAK,kBAAkB,gBAAgB;;CAGhD,qBAA4B,WAAwC;AAClE,SAAO,KAAK,kBACV,cAAc,SAAS,qBAAqB,sBAC7C;;CAGH,iBAAwB,MAA6B;EACnD,MAAM,OACJ,KAAK,WAAA,gBAAA,yBACD,oBACA;AAEN,SAAO,KAAK,kBAAkB,KAAK;;CAGrC,QAAqB;AACnB,OAAK,oBAAoB,EAAE;AAC3B,OAAK,gBAAgB;GACnB,YAAY;GACZ,gBAAgB;GAChB,WAAW;GACX,WAAW;GACX,UAAU;GACV,iBAAiB;GACjB,eAAe;GACf,kBAAkB;GAClB,MAAM;GACN,kBAAkB;GAClB,qBAAqB;GACrB,aAAa;GACd;;CAGH,qBAA6B,MAAmB,WAA2B;EACzE,MAAM,MAAM,yBAAyB,KAAK,GAAG,UAAU;AAEvD,OAAK,kBAAkB,QAAQ,KAAK,kBAAkB,QAAQ,KAAK;;CAErE,sBAAqD;AACnD,SAAO,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/managers/MXLLimitManager/types.ts"],"mappings":";;;;;UAIiB,mBAAA;EACf,IAAA,GAAO,UAAA;EACP,UAAA,EAAY,MAAA,CAAO,cAAA;EACnB,SAAA,EAAW,MAAA,CAAO,iBAAA;EAClB,aAAA,E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AAe,cAAA;AAAA;AAAA,UAGZ,gBAAA;EACf,OAAA;EACA,UAAA,EAAY,MAAA,SAAe,cAAA;AAAA;AAAA,UAGZ,sBAAA;EACf,GAAA;EACA,KAAA;AAAA;AAAA,UAGe,oBAAA;EACf,gBAAA,GAAmB,IAAA,EAAM,YAAA;;EAGzB,uBAAA;EAzDwB;EA4DxB,sBAAA;EA1DwB;EA6DxB,oBAAA,GAAuB,SAAA;EACvB,QAAA,GACE,OAAA,UACA,QAAA,EAAU,WAAA,EACV,UAAA,EAAY,MAAA,SAAe,cAAA,kBACxB,UAAA;EACL,cAAA,GACE,OAAA,UACA,UAAA,EAAY,MAAA,SAAe,cAAA,kBACxB,gBAAA;EACL,oBAAA,GACE,GAAA,UACA,KAAA,aACG,sBAAA;EACL,eAAA,GAAkB,IAAA,aAAiB,iBAAA;EACnC,KAAA;EACA,mBAAA,QAA2B,MAAA;EAC3B,cAAA,GAAiB,IAAA,EAAM,iBAAA,EAAmB,IAAA;AAAA"}
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../_virtual/_rolldown/runtime.cjs");
3
- const require_utils_getIncrementedCount = require("../../utils/getIncrementedCount.cjs");
4
3
  const require_constants_attributes = require("../../constants/attributes.cjs");
5
- const require_utils_getVisibilityState = require("../../utils/getVisibilityState.cjs");
6
- const require_utils_globalConfig = require("../../utils/globalConfig.cjs");
7
4
  const require_utils_PerformanceManager_OTelPerformanceManager = require("../../utils/PerformanceManager/OTelPerformanceManager.cjs");
5
+ const require_utils_globalConfig = require("../../utils/globalConfig.cjs");
6
+ const require_utils_getIncrementedCount = require("../../utils/getIncrementedCount.cjs");
7
+ const require_utils_getVisibilityState = require("../../utils/getVisibilityState.cjs");
8
8
  let _opentelemetry_api = require("@opentelemetry/api");
9
- let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
10
9
  let _opentelemetry_api_logs = require("@opentelemetry/api-logs");
10
+ let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
11
11
  //#region src/managers/MXLLogManager/MXLLogManager.ts
12
12
  const MXL_EXCEPTION_NUMBER_STORAGE_KEY = "mxl_exception_number";
13
13
  /**