@safaricom-mxl/web-sdk 0.1.3 → 0.1.5
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.
- package/README.md +18 -14
- package/UPGRADING.md +23 -1
- package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.cjs +12 -1
- package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.cjs.map +1 -1
- package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.cts +2 -0
- package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.cts.map +1 -1
- package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.ts +2 -0
- package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.ts.map +1 -1
- package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.js +12 -1
- package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.js.map +1 -1
- package/dist/api-page/manager/types.d.cts +2 -1
- package/dist/api-page/manager/types.d.cts.map +1 -1
- package/dist/api-page/manager/types.d.ts +2 -1
- package/dist/api-page/manager/types.d.ts.map +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.cjs +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.cjs.map +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.cts +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.cts.map +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts.map +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.js +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.js.map +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.cjs +2 -2
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.cjs.map +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.cts +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.cts.map +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts.map +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.js +2 -2
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.js.map +1 -1
- package/dist/constants/attributes.cjs +12 -0
- package/dist/constants/attributes.cjs.map +1 -1
- package/dist/constants/attributes.d.cts +7 -1
- package/dist/constants/attributes.d.cts.map +1 -1
- package/dist/constants/attributes.d.ts +7 -1
- package/dist/constants/attributes.d.ts.map +1 -1
- package/dist/constants/attributes.js +7 -1
- package/dist/constants/attributes.js.map +1 -1
- package/dist/exporters/BaseFetchExporter/BaseFetchExporter.d.ts +1 -1
- package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.cjs +1 -2
- package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.cjs.map +1 -1
- package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.cts +3 -4
- package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.cts.map +1 -1
- package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.ts +1 -2
- package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.ts.map +1 -1
- package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.js +1 -2
- package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.js.map +1 -1
- package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.cjs +12 -2
- package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.cjs.map +1 -1
- package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.cts +5 -2
- package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.cts.map +1 -1
- package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.ts +5 -2
- package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.ts.map +1 -1
- package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.js +12 -2
- package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.js.map +1 -1
- package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.cjs +1 -2
- package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.js +1 -2
- package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.js.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.cjs +29 -33
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.cts +4 -2
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.ts +4 -2
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.js +29 -33
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.js.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.cjs +14 -12
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.cjs.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.cts +3 -2
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.cts.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.ts +3 -2
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.ts.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.js +14 -12
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.js.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.cts +1 -2
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.cts.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.ts +1 -2
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.ts.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.cjs +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.cjs.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.js +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.js.map +1 -1
- package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.cjs +3 -5
- package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.js +3 -5
- package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.js.map +1 -1
- package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.cjs +7 -3
- package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.d.cts +1 -0
- package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.d.ts +1 -0
- package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.js +7 -3
- package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.js.map +1 -1
- package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.cjs +2 -3
- package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.js +2 -3
- package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.js.map +1 -1
- package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.cjs +4 -5
- package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.js +3 -4
- package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.js.map +1 -1
- package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.cjs +172 -0
- package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.cjs.map +1 -0
- package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.d.cts +38 -0
- package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.d.cts.map +1 -0
- package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.d.ts +38 -0
- package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.d.ts.map +1 -0
- package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.js +170 -0
- package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.js.map +1 -0
- package/dist/instrumentations/js-profiler/constants.cjs +21 -0
- package/dist/instrumentations/js-profiler/constants.cjs.map +1 -0
- package/dist/instrumentations/js-profiler/constants.d.cts +13 -0
- package/dist/instrumentations/js-profiler/constants.d.cts.map +1 -0
- package/dist/instrumentations/js-profiler/constants.d.ts +13 -0
- package/dist/instrumentations/js-profiler/constants.d.ts.map +1 -0
- package/dist/instrumentations/js-profiler/constants.js +13 -0
- package/dist/instrumentations/js-profiler/constants.js.map +1 -0
- package/dist/instrumentations/js-profiler/fixture.cjs +54 -0
- package/dist/instrumentations/js-profiler/fixture.cjs.map +1 -0
- package/dist/instrumentations/js-profiler/fixture.d.cts +7 -0
- package/dist/instrumentations/js-profiler/fixture.d.cts.map +1 -0
- package/dist/instrumentations/js-profiler/fixture.d.ts +7 -0
- package/dist/instrumentations/js-profiler/fixture.d.ts.map +1 -0
- package/dist/instrumentations/js-profiler/fixture.js +53 -0
- package/dist/instrumentations/js-profiler/fixture.js.map +1 -0
- package/dist/instrumentations/js-profiler/reduceProfilerTrace.cjs +63 -0
- package/dist/instrumentations/js-profiler/reduceProfilerTrace.cjs.map +1 -0
- package/dist/instrumentations/js-profiler/reduceProfilerTrace.d.cts +7 -0
- package/dist/instrumentations/js-profiler/reduceProfilerTrace.d.cts.map +1 -0
- package/dist/instrumentations/js-profiler/reduceProfilerTrace.d.ts +7 -0
- package/dist/instrumentations/js-profiler/reduceProfilerTrace.d.ts.map +1 -0
- package/dist/instrumentations/js-profiler/reduceProfilerTrace.js +62 -0
- package/dist/instrumentations/js-profiler/reduceProfilerTrace.js.map +1 -0
- package/dist/instrumentations/js-profiler/types.cjs +0 -0
- package/dist/instrumentations/js-profiler/types.d.cts +51 -0
- package/dist/instrumentations/js-profiler/types.d.cts.map +1 -0
- package/dist/instrumentations/js-profiler/types.d.ts +51 -0
- package/dist/instrumentations/js-profiler/types.d.ts.map +1 -0
- package/dist/instrumentations/js-profiler/types.js +0 -0
- package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.cjs +3 -5
- package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.js +1 -3
- package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.js.map +1 -1
- package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.cjs +2 -3
- package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.js +1 -2
- package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.js.map +1 -1
- package/dist/instrumentations/memory/MemoryInstrumentation.cjs +216 -0
- package/dist/instrumentations/memory/MemoryInstrumentation.cjs.map +1 -0
- package/dist/instrumentations/memory/MemoryInstrumentation.d.cts +55 -0
- package/dist/instrumentations/memory/MemoryInstrumentation.d.cts.map +1 -0
- package/dist/instrumentations/memory/MemoryInstrumentation.d.ts +55 -0
- package/dist/instrumentations/memory/MemoryInstrumentation.d.ts.map +1 -0
- package/dist/instrumentations/memory/MemoryInstrumentation.js +215 -0
- package/dist/instrumentations/memory/MemoryInstrumentation.js.map +1 -0
- package/dist/instrumentations/memory/browserFamily.cjs +13 -0
- package/dist/instrumentations/memory/browserFamily.cjs.map +1 -0
- package/dist/instrumentations/memory/browserFamily.d.cts +5 -0
- package/dist/instrumentations/memory/browserFamily.d.cts.map +1 -0
- package/dist/instrumentations/memory/browserFamily.d.ts +5 -0
- package/dist/instrumentations/memory/browserFamily.d.ts.map +1 -0
- package/dist/instrumentations/memory/browserFamily.js +12 -0
- package/dist/instrumentations/memory/browserFamily.js.map +1 -0
- package/dist/instrumentations/memory/constants.cjs +25 -0
- package/dist/instrumentations/memory/constants.cjs.map +1 -0
- package/dist/instrumentations/memory/constants.d.cts +13 -0
- package/dist/instrumentations/memory/constants.d.cts.map +1 -0
- package/dist/instrumentations/memory/constants.d.ts +13 -0
- package/dist/instrumentations/memory/constants.d.ts.map +1 -0
- package/dist/instrumentations/memory/constants.js +22 -0
- package/dist/instrumentations/memory/constants.js.map +1 -0
- package/dist/instrumentations/memory/resource.cjs +30 -0
- package/dist/instrumentations/memory/resource.cjs.map +1 -0
- package/dist/instrumentations/memory/resource.d.cts +16 -0
- package/dist/instrumentations/memory/resource.d.cts.map +1 -0
- package/dist/instrumentations/memory/resource.d.ts +16 -0
- package/dist/instrumentations/memory/resource.d.ts.map +1 -0
- package/dist/instrumentations/memory/resource.js +27 -0
- package/dist/instrumentations/memory/resource.js.map +1 -0
- package/dist/instrumentations/memory/startMemoryMeterProvider.cjs +27 -0
- package/dist/instrumentations/memory/startMemoryMeterProvider.cjs.map +1 -0
- package/dist/instrumentations/memory/startMemoryMeterProvider.d.cts +7 -0
- package/dist/instrumentations/memory/startMemoryMeterProvider.d.cts.map +1 -0
- package/dist/instrumentations/memory/startMemoryMeterProvider.d.ts +7 -0
- package/dist/instrumentations/memory/startMemoryMeterProvider.d.ts.map +1 -0
- package/dist/instrumentations/memory/startMemoryMeterProvider.js +25 -0
- package/dist/instrumentations/memory/startMemoryMeterProvider.js.map +1 -0
- package/dist/instrumentations/memory/types.cjs +0 -0
- package/dist/instrumentations/memory/types.d.cts +47 -0
- package/dist/instrumentations/memory/types.d.cts.map +1 -0
- package/dist/instrumentations/memory/types.d.ts +47 -0
- package/dist/instrumentations/memory/types.d.ts.map +1 -0
- package/dist/instrumentations/memory/types.js +0 -0
- package/dist/instrumentations/memory/visibility.cjs +25 -0
- package/dist/instrumentations/memory/visibility.cjs.map +1 -0
- package/dist/instrumentations/memory/visibility.d.cts +14 -0
- package/dist/instrumentations/memory/visibility.d.cts.map +1 -0
- package/dist/instrumentations/memory/visibility.d.ts +14 -0
- package/dist/instrumentations/memory/visibility.d.ts.map +1 -0
- package/dist/instrumentations/memory/visibility.js +24 -0
- package/dist/instrumentations/memory/visibility.js.map +1 -0
- package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.cjs +62 -55
- package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.cts +16 -5
- package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.ts +16 -5
- package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.js +62 -55
- package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.js.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.cjs +3 -3
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.cjs.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.d.cts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.d.ts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.js +3 -3
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.js.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.cjs +10 -13
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.cjs.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.d.cts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.d.ts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.js +10 -13
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.js.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.cjs +8 -4
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.cjs.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.d.cts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.d.ts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.js +8 -4
- package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.js.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.cts +2 -0
- package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.cts.map +1 -1
- package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.ts +2 -0
- package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.ts.map +1 -1
- package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.cjs +14 -13
- package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.cts +1 -0
- package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts +1 -0
- package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.js +13 -12
- package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.js.map +1 -1
- package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.cjs +0 -2
- package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.js +0 -2
- package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.js.map +1 -1
- package/dist/instrumentations/replay/ReplayInstrumentation/types.d.cts +1 -1
- package/dist/instrumentations/replay/ReplayInstrumentation/types.d.ts +1 -1
- package/dist/instrumentations/replay/events/capture/network.cjs +31 -22
- package/dist/instrumentations/replay/events/capture/network.cjs.map +1 -1
- package/dist/instrumentations/replay/events/capture/network.js +31 -22
- package/dist/instrumentations/replay/events/capture/network.js.map +1 -1
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.cjs +2 -2
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.cjs.map +1 -1
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.d.cts.map +1 -1
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.d.ts.map +1 -1
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.js +2 -2
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.js.map +1 -1
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.cjs +1 -1
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.cjs.map +1 -1
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.js +1 -1
- package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.js.map +1 -1
- package/dist/instrumentations/replay/rrwebLoader/types.d.cts +4 -2
- package/dist/instrumentations/replay/rrwebLoader/types.d.cts.map +1 -1
- package/dist/instrumentations/replay/rrwebLoader/types.d.ts +4 -2
- package/dist/instrumentations/replay/rrwebLoader/types.d.ts.map +1 -1
- package/dist/instrumentations/replay/transport/idleFlushTimer.cjs.map +1 -1
- package/dist/instrumentations/replay/transport/idleFlushTimer.d.cts.map +1 -1
- package/dist/instrumentations/replay/transport/idleFlushTimer.d.ts.map +1 -1
- package/dist/instrumentations/replay/transport/idleFlushTimer.js.map +1 -1
- package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.cjs +4 -18
- package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.d.cts +0 -2
- package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.d.ts +0 -2
- package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.js +3 -17
- package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.js.map +1 -1
- package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.cjs +8 -11
- package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.js +8 -11
- package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.js.map +1 -1
- package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.cjs +7 -10
- package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.js +6 -9
- package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.js.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.cjs +24 -16
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.cts +3 -2
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.cts.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.ts +3 -2
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.ts.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.js +24 -16
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.js.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.cjs +11 -63
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.cjs.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.d.cts +4 -56
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.d.cts.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.d.ts +4 -56
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.d.ts.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.js +11 -62
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.js.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.cts +1 -2
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.cts.map +1 -1
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.ts +1 -2
- package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.ts.map +1 -1
- package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.cjs +5 -5
- package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.cjs.map +1 -1
- package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.d.cts.map +1 -1
- package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.d.ts.map +1 -1
- package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.js +4 -4
- package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.js.map +1 -1
- package/dist/managers/MXLAnalyticsManager/types.d.cts +1 -2
- package/dist/managers/MXLAnalyticsManager/types.d.cts.map +1 -1
- package/dist/managers/MXLAnalyticsManager/types.d.ts +1 -2
- package/dist/managers/MXLAnalyticsManager/types.d.ts.map +1 -1
- package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.cjs +14 -0
- package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.cjs.map +1 -1
- package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.cts +4 -1
- package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.cts.map +1 -1
- package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.ts +4 -1
- package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.ts.map +1 -1
- package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.js +14 -0
- package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.js.map +1 -1
- package/dist/managers/MXLConfigManager/performanceDefaults.cjs +21 -0
- package/dist/managers/MXLConfigManager/performanceDefaults.cjs.map +1 -0
- package/dist/managers/MXLConfigManager/performanceDefaults.d.cts +12 -0
- package/dist/managers/MXLConfigManager/performanceDefaults.d.cts.map +1 -0
- package/dist/managers/MXLConfigManager/performanceDefaults.d.ts +12 -0
- package/dist/managers/MXLConfigManager/performanceDefaults.d.ts.map +1 -0
- package/dist/managers/MXLConfigManager/performanceDefaults.js +13 -0
- package/dist/managers/MXLConfigManager/performanceDefaults.js.map +1 -0
- package/dist/managers/MXLConfigManager/resolveEffectivePerformance.cjs +29 -0
- package/dist/managers/MXLConfigManager/resolveEffectivePerformance.cjs.map +1 -0
- package/dist/managers/MXLConfigManager/resolveEffectivePerformance.d.cts +40 -0
- package/dist/managers/MXLConfigManager/resolveEffectivePerformance.d.cts.map +1 -0
- package/dist/managers/MXLConfigManager/resolveEffectivePerformance.d.ts +40 -0
- package/dist/managers/MXLConfigManager/resolveEffectivePerformance.d.ts.map +1 -0
- package/dist/managers/MXLConfigManager/resolveEffectivePerformance.js +27 -0
- package/dist/managers/MXLConfigManager/resolveEffectivePerformance.js.map +1 -0
- package/dist/managers/MXLConfigManager/types.d.cts +18 -1
- package/dist/managers/MXLConfigManager/types.d.cts.map +1 -1
- package/dist/managers/MXLConfigManager/types.d.ts +18 -1
- package/dist/managers/MXLConfigManager/types.d.ts.map +1 -1
- package/dist/managers/MXLConfigManager/utils.cjs +37 -0
- package/dist/managers/MXLConfigManager/utils.cjs.map +1 -1
- package/dist/managers/MXLConfigManager/utils.d.cts.map +1 -1
- package/dist/managers/MXLConfigManager/utils.d.ts.map +1 -1
- package/dist/managers/MXLConfigManager/utils.js +37 -0
- package/dist/managers/MXLConfigManager/utils.js.map +1 -1
- package/dist/managers/MXLLogManager/MXLLogManager.cjs +7 -8
- package/dist/managers/MXLLogManager/MXLLogManager.cjs.map +1 -1
- package/dist/managers/MXLLogManager/MXLLogManager.js +3 -4
- package/dist/managers/MXLLogManager/MXLLogManager.js.map +1 -1
- package/dist/managers/MXLLogManager/MXLLoggerProvider.cjs +46 -0
- package/dist/managers/MXLLogManager/MXLLoggerProvider.cjs.map +1 -0
- package/dist/managers/MXLLogManager/MXLLoggerProvider.d.cts +22 -0
- package/dist/managers/MXLLogManager/MXLLoggerProvider.d.cts.map +1 -0
- package/dist/managers/MXLLogManager/MXLLoggerProvider.d.ts +22 -0
- package/dist/managers/MXLLogManager/MXLLoggerProvider.d.ts.map +1 -0
- package/dist/managers/MXLLogManager/MXLLoggerProvider.js +44 -0
- package/dist/managers/MXLLogManager/MXLLoggerProvider.js.map +1 -0
- package/dist/managers/MXLLogManager/types.d.cts +9 -3
- package/dist/managers/MXLLogManager/types.d.cts.map +1 -1
- package/dist/managers/MXLLogManager/types.d.ts +9 -3
- package/dist/managers/MXLLogManager/types.d.ts.map +1 -1
- package/dist/managers/MXLPageManager/MXLPageManager.cjs +6 -5
- package/dist/managers/MXLPageManager/MXLPageManager.cjs.map +1 -1
- package/dist/managers/MXLPageManager/MXLPageManager.d.cts.map +1 -1
- package/dist/managers/MXLPageManager/MXLPageManager.d.ts.map +1 -1
- package/dist/managers/MXLPageManager/MXLPageManager.js +7 -6
- package/dist/managers/MXLPageManager/MXLPageManager.js.map +1 -1
- package/dist/managers/MXLTraceManager/MXLExtendedSpan.cjs +56 -9
- package/dist/managers/MXLTraceManager/MXLExtendedSpan.cjs.map +1 -1
- package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.cts +21 -5
- package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.cts.map +1 -1
- package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.ts +21 -5
- package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.ts.map +1 -1
- package/dist/managers/MXLTraceManager/MXLExtendedSpan.js +56 -10
- package/dist/managers/MXLTraceManager/MXLExtendedSpan.js.map +1 -1
- package/dist/managers/MXLTraceManager/MXLTraceManager.cjs +2 -2
- package/dist/managers/MXLTraceManager/MXLTraceManager.cjs.map +1 -1
- package/dist/managers/MXLTraceManager/MXLTraceManager.js +2 -2
- package/dist/managers/MXLTraceManager/MXLTraceManager.js.map +1 -1
- package/dist/managers/MXLTraceManager/MXLTracerProvider.cjs +42 -0
- package/dist/managers/MXLTraceManager/MXLTracerProvider.cjs.map +1 -0
- package/dist/managers/MXLTraceManager/MXLTracerProvider.d.cts +22 -0
- package/dist/managers/MXLTraceManager/MXLTracerProvider.d.cts.map +1 -0
- package/dist/managers/MXLTraceManager/MXLTracerProvider.d.ts +22 -0
- package/dist/managers/MXLTraceManager/MXLTracerProvider.d.ts.map +1 -0
- package/dist/managers/MXLTraceManager/MXLTracerProvider.js +40 -0
- package/dist/managers/MXLTraceManager/MXLTracerProvider.js.map +1 -0
- package/dist/managers/MXLTraceManager/types.cjs +0 -0
- package/dist/managers/MXLTraceManager/types.d.cts +10 -0
- package/dist/managers/MXLTraceManager/types.d.cts.map +1 -0
- package/dist/managers/MXLTraceManager/types.d.ts +10 -0
- package/dist/managers/MXLTraceManager/types.d.ts.map +1 -0
- package/dist/managers/MXLTraceManager/types.js +0 -0
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.cjs +30 -20
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.cjs.map +1 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.cts +3 -3
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.cts.map +1 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.ts +3 -3
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.ts.map +1 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.js +31 -21
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.js.map +1 -1
- package/dist/managers/MXLUserSessionManager/types.d.cts +10 -2
- package/dist/managers/MXLUserSessionManager/types.d.cts.map +1 -1
- package/dist/managers/MXLUserSessionManager/types.d.ts +10 -2
- package/dist/managers/MXLUserSessionManager/types.d.ts.map +1 -1
- package/dist/mxl-web-sdk.js +12 -2
- package/dist/mxl-web-sdk.js.map +1 -1
- package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.cjs.map +1 -1
- package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.d.cts +2 -2
- package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.d.cts.map +1 -1
- package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.d.ts +2 -2
- package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.d.ts.map +1 -1
- package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.js.map +1 -1
- package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.cjs.map +1 -1
- package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.d.cts +2 -2
- package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.d.cts.map +1 -1
- package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.d.ts +2 -2
- package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.d.ts.map +1 -1
- package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.js.map +1 -1
- package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.cjs.map +1 -1
- package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.d.cts +2 -2
- package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.d.cts.map +1 -1
- package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.d.ts +2 -2
- package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.d.ts.map +1 -1
- package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.js.map +1 -1
- package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.cjs +1 -1
- package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.cjs.map +1 -1
- package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.cts +2 -2
- package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.cts.map +1 -1
- package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.ts +2 -2
- package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.ts.map +1 -1
- package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.js +1 -1
- package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.js.map +1 -1
- package/dist/processors/PageSpanProcessor/PageSpanProcessor.cjs +1 -1
- package/dist/processors/PageSpanProcessor/PageSpanProcessor.cjs.map +1 -1
- package/dist/processors/PageSpanProcessor/PageSpanProcessor.d.cts.map +1 -1
- package/dist/processors/PageSpanProcessor/PageSpanProcessor.d.ts.map +1 -1
- package/dist/processors/PageSpanProcessor/PageSpanProcessor.js +1 -1
- package/dist/processors/PageSpanProcessor/PageSpanProcessor.js.map +1 -1
- package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.cjs +26 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.cjs.map +1 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.d.cts +20 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.d.cts.map +1 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.d.ts +20 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.d.ts.map +1 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.js +25 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.js.map +1 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/types.cjs +0 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/types.d.cts +9 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/types.d.cts.map +1 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/types.d.ts +9 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/types.d.ts.map +1 -0
- package/dist/processors/PerfClockLagLogRecordProcessor/types.js +0 -0
- package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.cjs +27 -0
- package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.cjs.map +1 -0
- package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.d.cts +21 -0
- package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.d.cts.map +1 -0
- package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.d.ts +21 -0
- package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.d.ts.map +1 -0
- package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.js +26 -0
- package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.js.map +1 -0
- package/dist/processors/PerfClockLagSpanProcessor/types.cjs +0 -0
- package/dist/processors/PerfClockLagSpanProcessor/types.d.cts +9 -0
- package/dist/processors/PerfClockLagSpanProcessor/types.d.cts.map +1 -0
- package/dist/processors/PerfClockLagSpanProcessor/types.d.ts +9 -0
- package/dist/processors/PerfClockLagSpanProcessor/types.d.ts.map +1 -0
- package/dist/processors/PerfClockLagSpanProcessor/types.js +0 -0
- package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.cjs +1 -1
- package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.cjs.map +1 -1
- package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.d.cts +2 -2
- package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.d.cts.map +1 -1
- package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.d.ts +2 -2
- package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.d.ts.map +1 -1
- package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.js +1 -1
- package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.js.map +1 -1
- package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.cjs.map +1 -1
- package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.d.cts +2 -2
- package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.d.cts.map +1 -1
- package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.d.ts +2 -2
- package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.d.ts.map +1 -1
- package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.js.map +1 -1
- package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.cjs.map +1 -1
- package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.cts +2 -2
- package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.cts.map +1 -1
- package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.ts +2 -2
- package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.ts.map +1 -1
- package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.js.map +1 -1
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.cjs +30 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.cjs.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.cts +22 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.cts.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.ts +22 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.ts.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.js +29 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.js.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/types.cjs +0 -0
- package/dist/processors/UserSessionSpanProcessor/types.d.cts +9 -0
- package/dist/processors/UserSessionSpanProcessor/types.d.cts.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/types.d.ts +9 -0
- package/dist/processors/UserSessionSpanProcessor/types.d.ts.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/types.js +0 -0
- package/dist/resources/sdkConstants.cjs +1 -1
- package/dist/resources/sdkConstants.cjs.map +1 -1
- package/dist/resources/sdkConstants.d.cts +1 -1
- package/dist/resources/sdkConstants.d.ts +1 -1
- package/dist/resources/sdkConstants.js +1 -1
- package/dist/resources/sdkConstants.js.map +1 -1
- package/dist/sdk/endpoints.cjs +2 -2
- package/dist/sdk/endpoints.cjs.map +1 -1
- package/dist/sdk/endpoints.d.cts +1 -1
- package/dist/sdk/endpoints.d.ts +1 -1
- package/dist/sdk/endpoints.js +2 -2
- package/dist/sdk/endpoints.js.map +1 -1
- package/dist/sdk/initSDK.cjs +43 -12
- package/dist/sdk/initSDK.cjs.map +1 -1
- package/dist/sdk/initSDK.js +46 -15
- package/dist/sdk/initSDK.js.map +1 -1
- package/dist/sdk/networkInstrumentations.cjs +1 -1
- package/dist/sdk/networkInstrumentations.cjs.map +1 -1
- package/dist/sdk/networkInstrumentations.d.cts.map +1 -1
- package/dist/sdk/networkInstrumentations.d.ts.map +1 -1
- package/dist/sdk/networkInstrumentations.js +1 -1
- package/dist/sdk/networkInstrumentations.js.map +1 -1
- package/dist/sdk/resolveInitConfig.cjs +2 -1
- package/dist/sdk/resolveInitConfig.cjs.map +1 -1
- package/dist/sdk/resolveInitConfig.d.cts +4 -0
- package/dist/sdk/resolveInitConfig.d.cts.map +1 -1
- package/dist/sdk/resolveInitConfig.d.ts +4 -0
- package/dist/sdk/resolveInitConfig.d.ts.map +1 -1
- package/dist/sdk/resolveInitConfig.js +2 -1
- package/dist/sdk/resolveInitConfig.js.map +1 -1
- package/dist/sdk/setupDefaultInstrumentations.cjs +17 -1
- package/dist/sdk/setupDefaultInstrumentations.cjs.map +1 -1
- package/dist/sdk/setupDefaultInstrumentations.d.cts +2 -1
- package/dist/sdk/setupDefaultInstrumentations.d.cts.map +1 -1
- package/dist/sdk/setupDefaultInstrumentations.d.ts +2 -1
- package/dist/sdk/setupDefaultInstrumentations.d.ts.map +1 -1
- package/dist/sdk/setupDefaultInstrumentations.js +17 -1
- package/dist/sdk/setupDefaultInstrumentations.js.map +1 -1
- package/dist/sdk/types.d.cts +43 -2
- package/dist/sdk/types.d.cts.map +1 -1
- package/dist/sdk/types.d.ts +43 -2
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/transport/RetryingTransport/RetryingTransport.cjs +2 -2
- package/dist/transport/RetryingTransport/RetryingTransport.cjs.map +1 -1
- package/dist/transport/RetryingTransport/RetryingTransport.js +2 -2
- package/dist/transport/RetryingTransport/RetryingTransport.js.map +1 -1
- package/dist/utils/InMemoryStorage/InMemoryStorage.cjs +27 -0
- package/dist/utils/InMemoryStorage/InMemoryStorage.cjs.map +1 -0
- package/dist/utils/InMemoryStorage/InMemoryStorage.d.cts +13 -0
- package/dist/utils/InMemoryStorage/InMemoryStorage.d.cts.map +1 -0
- package/dist/utils/InMemoryStorage/InMemoryStorage.d.ts +13 -0
- package/dist/utils/InMemoryStorage/InMemoryStorage.d.ts.map +1 -0
- package/dist/utils/InMemoryStorage/InMemoryStorage.js +26 -0
- package/dist/utils/InMemoryStorage/InMemoryStorage.js.map +1 -0
- package/dist/utils/PerformanceManager/OTelPerformanceManager.cjs +71 -24
- package/dist/utils/PerformanceManager/OTelPerformanceManager.cjs.map +1 -1
- package/dist/utils/PerformanceManager/OTelPerformanceManager.d.cts +18 -19
- package/dist/utils/PerformanceManager/OTelPerformanceManager.d.cts.map +1 -1
- package/dist/utils/PerformanceManager/OTelPerformanceManager.d.ts +18 -19
- package/dist/utils/PerformanceManager/OTelPerformanceManager.d.ts.map +1 -1
- package/dist/utils/PerformanceManager/OTelPerformanceManager.js +70 -22
- package/dist/utils/PerformanceManager/OTelPerformanceManager.js.map +1 -1
- package/dist/utils/PerformanceManager/types.d.cts +28 -12
- package/dist/utils/PerformanceManager/types.d.cts.map +1 -1
- package/dist/utils/PerformanceManager/types.d.ts +28 -12
- package/dist/utils/PerformanceManager/types.d.ts.map +1 -1
- package/dist/utils/getWindowStorageOrInMemory.cjs +24 -0
- package/dist/utils/getWindowStorageOrInMemory.cjs.map +1 -0
- package/dist/utils/getWindowStorageOrInMemory.d.cts +13 -0
- package/dist/utils/getWindowStorageOrInMemory.d.cts.map +1 -0
- package/dist/utils/getWindowStorageOrInMemory.d.ts +13 -0
- package/dist/utils/getWindowStorageOrInMemory.d.ts.map +1 -0
- package/dist/utils/getWindowStorageOrInMemory.js +23 -0
- package/dist/utils/getWindowStorageOrInMemory.js.map +1 -0
- package/dist/utils/sdkLoadOriginOffset.cjs +12 -0
- package/dist/utils/sdkLoadOriginOffset.cjs.map +1 -0
- package/dist/utils/sdkLoadOriginOffset.d.cts +10 -0
- package/dist/utils/sdkLoadOriginOffset.d.cts.map +1 -0
- package/dist/utils/sdkLoadOriginOffset.d.ts +10 -0
- package/dist/utils/sdkLoadOriginOffset.d.ts.map +1 -0
- package/dist/utils/sdkLoadOriginOffset.js +11 -0
- package/dist/utils/sdkLoadOriginOffset.js.map +1 -0
- package/package.json +20 -22
|
@@ -1,35 +1,32 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_api_page_pageAPI = require("../../../../../api-page/pageAPI.cjs");
|
|
2
3
|
require("../../../../../constants/attributes.cjs");
|
|
3
4
|
const require_instrumentations_navigation_NavigationInstrumentation_instance = require("../../instance.cjs");
|
|
4
5
|
//#region src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Filtering by currentPathname ensures that we only consider routes that are relevant to the current URL.
|
|
7
|
+
* matchRoutes already scopes `matches` to the given pathname, ordered from
|
|
8
|
+
* the root route to the deepest one, so the full pattern is built by
|
|
9
|
+
* reducing over all of them. Pathless layout and index routes contribute no
|
|
10
|
+
* `route.path` of their own, so they're skipped.
|
|
11
11
|
*/
|
|
12
12
|
const getRouteFromMatches = (matches, currentPathname) => {
|
|
13
|
-
|
|
14
|
-
if (currentMatchIndex === -1 || !matches[currentMatchIndex].route.path) return null;
|
|
15
|
-
return matches.slice(0, currentMatchIndex + 1).reduce((acc, match) => {
|
|
13
|
+
return matches.reduce((acc, match) => {
|
|
16
14
|
const routePath = match.route.path;
|
|
17
15
|
if (!routePath) return acc;
|
|
18
16
|
return {
|
|
19
17
|
path: routePath.startsWith("/") ? routePath : `${acc?.path ?? ""}/${routePath}`,
|
|
20
|
-
url:
|
|
18
|
+
url: currentPathname
|
|
21
19
|
};
|
|
22
20
|
}, null);
|
|
23
21
|
};
|
|
24
22
|
const listenToRouterChanges = ({ router, routesMatcher, config: { pathnameDocument = window.location } = {} }) => {
|
|
25
|
-
|
|
26
|
-
navigationInstrumentation.setInstrumentationType("react_router_data");
|
|
23
|
+
require_instrumentations_navigation_NavigationInstrumentation_instance.getNavigationInstrumentation().setInstrumentationType("react_router_data");
|
|
27
24
|
const initialMatches = routesMatcher(router.routes, { pathname: pathnameDocument.pathname });
|
|
28
25
|
const initialRoute = initialMatches ? getRouteFromMatches(initialMatches, pathnameDocument.pathname) : null;
|
|
29
|
-
if (initialRoute)
|
|
26
|
+
if (initialRoute) require_api_page_pageAPI.page.setCurrentRoute(initialRoute);
|
|
30
27
|
return router.subscribe((state) => {
|
|
31
28
|
const currentRoute = getRouteFromMatches(state.matches, state.location.pathname);
|
|
32
|
-
if (currentRoute)
|
|
29
|
+
if (currentRoute) require_api_page_pageAPI.page.setCurrentRoute(currentRoute);
|
|
33
30
|
});
|
|
34
31
|
};
|
|
35
32
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listenToRouterChanges.cjs","names":["getNavigationInstrumentation"],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"sourcesContent":["import type { Route } from '../../../../../api-page/manager/types';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { ListenToRouterChangesArgs, Match } from './types';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"listenToRouterChanges.cjs","names":["getNavigationInstrumentation"],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"sourcesContent":["import type { Route } from '../../../../../api-page/manager/types';\nimport { page } from '../../../../../api-page/pageAPI';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { ListenToRouterChangesArgs, Match } from './types';\n\n/**\n * matchRoutes already scopes `matches` to the given pathname, ordered from\n * the root route to the deepest one, so the full pattern is built by\n * reducing over all of them. Pathless layout and index routes contribute no\n * `route.path` of their own, so they're skipped.\n */\nconst getRouteFromMatches = (\n matches: Match[],\n currentPathname: string,\n): Route | null => {\n return matches.reduce<Route | null>((acc, match) => {\n const routePath = match.route.path;\n\n if (!routePath) {\n return acc;\n }\n\n // If the route path starts with '/', it's an absolute path and should reset the accumulated path.\n // Otherwise, it's a relative path and should be appended to the accumulated path.\n const path = routePath.startsWith('/')\n ? routePath\n : `${acc?.path ?? ''}/${routePath}`;\n\n return { path, url: currentPathname };\n }, null);\n};\n\nexport const listenToRouterChanges = ({\n router,\n routesMatcher,\n config: { pathnameDocument = window.location } = {},\n}: ListenToRouterChangesArgs) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Data,\n );\n\n const initialMatches = routesMatcher(router.routes, {\n pathname: pathnameDocument.pathname,\n });\n\n const initialRoute = initialMatches\n ? getRouteFromMatches(initialMatches, pathnameDocument.pathname)\n : null;\n\n if (initialRoute) {\n page.setCurrentRoute(initialRoute);\n }\n\n return router.subscribe((state) => {\n // State has a list of already matched routes\n // https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/router/router.ts#L954\n const currentRoute = getRouteFromMatches(\n state.matches,\n state.location.pathname,\n );\n\n if (currentRoute) {\n page.setCurrentRoute(currentRoute);\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,uBACJ,SACA,oBACiB;AACjB,QAAO,QAAQ,QAAsB,KAAK,UAAU;EAClD,MAAM,YAAY,MAAM,MAAM;AAE9B,MAAI,CAAC,UACH,QAAO;AAST,SAAO;GAAE,MAJI,UAAU,WAAW,IAAI,GAClC,YACA,GAAG,KAAK,QAAQ,GAAG,GAAG;GAEX,KAAK;GAAiB;IACpC,KAAK;;AAGV,MAAa,yBAAyB,EACpC,QACA,eACA,QAAQ,EAAE,mBAAmB,OAAO,aAAa,EAAE,OACpB;AACGA,wEAAAA,8BACT,CAAC,uBAAA,oBAEzB;CAED,MAAM,iBAAiB,cAAc,OAAO,QAAQ,EAClD,UAAU,iBAAiB,UAC5B,CAAC;CAEF,MAAM,eAAe,iBACjB,oBAAoB,gBAAgB,iBAAiB,SAAS,GAC9D;AAEJ,KAAI,aACF,0BAAA,KAAK,gBAAgB,aAAa;AAGpC,QAAO,OAAO,WAAW,UAAU;EAGjC,MAAM,eAAe,oBACnB,MAAM,SACN,MAAM,SAAS,SAChB;AAED,MAAI,aACF,0BAAA,KAAK,gBAAgB,aAAa;GAEpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listenToRouterChanges.d.cts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"listenToRouterChanges.d.cts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"mappings":";;;cAiCa,qBAAA;EAAyB,MAAA;EAAA,aAAA;EAAA,MAAA;IAAA;EAAA;AAAA,GAInC,yBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listenToRouterChanges.d.ts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"listenToRouterChanges.d.ts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"mappings":";;;cAiCa,qBAAA;EAAyB,MAAA;EAAA,aAAA;EAAA,MAAA;IAAA;EAAA;AAAA,GAInC,yBAAA"}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
+
import { page } from "../../../../../api-page/pageAPI.js";
|
|
1
2
|
import "../../../../../constants/attributes.js";
|
|
2
3
|
import { getNavigationInstrumentation } from "../../instance.js";
|
|
3
4
|
//#region src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* Filtering by currentPathname ensures that we only consider routes that are relevant to the current URL.
|
|
6
|
+
* matchRoutes already scopes `matches` to the given pathname, ordered from
|
|
7
|
+
* the root route to the deepest one, so the full pattern is built by
|
|
8
|
+
* reducing over all of them. Pathless layout and index routes contribute no
|
|
9
|
+
* `route.path` of their own, so they're skipped.
|
|
10
10
|
*/
|
|
11
11
|
const getRouteFromMatches = (matches, currentPathname) => {
|
|
12
|
-
|
|
13
|
-
if (currentMatchIndex === -1 || !matches[currentMatchIndex].route.path) return null;
|
|
14
|
-
return matches.slice(0, currentMatchIndex + 1).reduce((acc, match) => {
|
|
12
|
+
return matches.reduce((acc, match) => {
|
|
15
13
|
const routePath = match.route.path;
|
|
16
14
|
if (!routePath) return acc;
|
|
17
15
|
return {
|
|
18
16
|
path: routePath.startsWith("/") ? routePath : `${acc?.path ?? ""}/${routePath}`,
|
|
19
|
-
url:
|
|
17
|
+
url: currentPathname
|
|
20
18
|
};
|
|
21
19
|
}, null);
|
|
22
20
|
};
|
|
23
21
|
const listenToRouterChanges = ({ router, routesMatcher, config: { pathnameDocument = window.location } = {} }) => {
|
|
24
|
-
|
|
25
|
-
navigationInstrumentation.setInstrumentationType("react_router_data");
|
|
22
|
+
getNavigationInstrumentation().setInstrumentationType("react_router_data");
|
|
26
23
|
const initialMatches = routesMatcher(router.routes, { pathname: pathnameDocument.pathname });
|
|
27
24
|
const initialRoute = initialMatches ? getRouteFromMatches(initialMatches, pathnameDocument.pathname) : null;
|
|
28
|
-
if (initialRoute)
|
|
25
|
+
if (initialRoute) page.setCurrentRoute(initialRoute);
|
|
29
26
|
return router.subscribe((state) => {
|
|
30
27
|
const currentRoute = getRouteFromMatches(state.matches, state.location.pathname);
|
|
31
|
-
if (currentRoute)
|
|
28
|
+
if (currentRoute) page.setCurrentRoute(currentRoute);
|
|
32
29
|
});
|
|
33
30
|
};
|
|
34
31
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listenToRouterChanges.js","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"sourcesContent":["import type { Route } from '../../../../../api-page/manager/types';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { ListenToRouterChangesArgs, Match } from './types';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"listenToRouterChanges.js","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"sourcesContent":["import type { Route } from '../../../../../api-page/manager/types';\nimport { page } from '../../../../../api-page/pageAPI';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { ListenToRouterChangesArgs, Match } from './types';\n\n/**\n * matchRoutes already scopes `matches` to the given pathname, ordered from\n * the root route to the deepest one, so the full pattern is built by\n * reducing over all of them. Pathless layout and index routes contribute no\n * `route.path` of their own, so they're skipped.\n */\nconst getRouteFromMatches = (\n matches: Match[],\n currentPathname: string,\n): Route | null => {\n return matches.reduce<Route | null>((acc, match) => {\n const routePath = match.route.path;\n\n if (!routePath) {\n return acc;\n }\n\n // If the route path starts with '/', it's an absolute path and should reset the accumulated path.\n // Otherwise, it's a relative path and should be appended to the accumulated path.\n const path = routePath.startsWith('/')\n ? routePath\n : `${acc?.path ?? ''}/${routePath}`;\n\n return { path, url: currentPathname };\n }, null);\n};\n\nexport const listenToRouterChanges = ({\n router,\n routesMatcher,\n config: { pathnameDocument = window.location } = {},\n}: ListenToRouterChangesArgs) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Data,\n );\n\n const initialMatches = routesMatcher(router.routes, {\n pathname: pathnameDocument.pathname,\n });\n\n const initialRoute = initialMatches\n ? getRouteFromMatches(initialMatches, pathnameDocument.pathname)\n : null;\n\n if (initialRoute) {\n page.setCurrentRoute(initialRoute);\n }\n\n return router.subscribe((state) => {\n // State has a list of already matched routes\n // https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/router/router.ts#L954\n const currentRoute = getRouteFromMatches(\n state.matches,\n state.location.pathname,\n );\n\n if (currentRoute) {\n page.setCurrentRoute(currentRoute);\n }\n });\n};\n"],"mappings":";;;;;;;;;;AAYA,MAAM,uBACJ,SACA,oBACiB;AACjB,QAAO,QAAQ,QAAsB,KAAK,UAAU;EAClD,MAAM,YAAY,MAAM,MAAM;AAE9B,MAAI,CAAC,UACH,QAAO;AAST,SAAO;GAAE,MAJI,UAAU,WAAW,IAAI,GAClC,YACA,GAAG,KAAK,QAAQ,GAAG,GAAG;GAEX,KAAK;GAAiB;IACpC,KAAK;;AAGV,MAAa,yBAAyB,EACpC,QACA,eACA,QAAQ,EAAE,mBAAmB,OAAO,aAAa,EAAE,OACpB;AACG,+BACT,CAAC,uBAAA,oBAEzB;CAED,MAAM,iBAAiB,cAAc,OAAO,QAAQ,EAClD,UAAU,iBAAiB,UAC5B,CAAC;CAEF,MAAM,eAAe,iBACjB,oBAAoB,gBAAgB,iBAAiB,SAAS,GAC9D;AAEJ,KAAI,aACF,MAAK,gBAAgB,aAAa;AAGpC,QAAO,OAAO,WAAW,UAAU;EAGjC,MAAM,eAAe,oBACnB,MAAM,SACN,MAAM,SAAS,SAChB;AAED,MAAI,aACF,MAAK,gBAAgB,aAAa;GAEpC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_runtime = require("../../../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_api_page_pageAPI = require("../../../../../api-page/pageAPI.cjs");
|
|
3
4
|
require("../../../../../constants/attributes.cjs");
|
|
4
5
|
const require_instrumentations_navigation_NavigationInstrumentation_instance = require("../../instance.cjs");
|
|
5
6
|
const require_hoist_non_react_statics_cjs$1 = require("../../../../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.cjs");
|
|
@@ -9,7 +10,11 @@ var import_hoist_non_react_statics_cjs = /* @__PURE__ */ require_runtime.__toESM
|
|
|
9
10
|
const getLastRoute = (matchedComponent, lastRoute) => {
|
|
10
11
|
if (!matchedComponent.props.match?.route) return null;
|
|
11
12
|
const childPath = matchedComponent.props.match.route.path;
|
|
12
|
-
|
|
13
|
+
if (!childPath) {
|
|
14
|
+
if (matchedComponent.props.routeContext?.outlet) return getLastRoute(matchedComponent.props.routeContext.outlet, lastRoute);
|
|
15
|
+
return lastRoute;
|
|
16
|
+
}
|
|
17
|
+
const path = lastRoute?.path && !childPath.startsWith("/") ? `${lastRoute.path}/${childPath}` : childPath;
|
|
13
18
|
if (matchedComponent.props.routeContext?.outlet) return getLastRoute(matchedComponent.props.routeContext.outlet, {
|
|
14
19
|
path,
|
|
15
20
|
url: matchedComponent.props.match.pathname
|
|
@@ -20,8 +25,7 @@ const getLastRoute = (matchedComponent, lastRoute) => {
|
|
|
20
25
|
};
|
|
21
26
|
};
|
|
22
27
|
const withMXLRouting = (WrappedComponent) => {
|
|
23
|
-
|
|
24
|
-
navigationInstrumentation.setInstrumentationType("react_router_declarative");
|
|
28
|
+
require_instrumentations_navigation_NavigationInstrumentation_instance.getNavigationInstrumentation().setInstrumentationType("react_router_declarative");
|
|
25
29
|
const RoutesWithMXLRouting = (props) => {
|
|
26
30
|
/**
|
|
27
31
|
* React-router v6+ implementation is very different from v5
|
|
@@ -37,7 +41,7 @@ const withMXLRouting = (WrappedComponent) => {
|
|
|
37
41
|
const matchedComponent = WrappedComponent(props);
|
|
38
42
|
if (matchedComponent.props.match?.route) {
|
|
39
43
|
const lastRoute = getLastRoute(matchedComponent, null);
|
|
40
|
-
if (lastRoute)
|
|
44
|
+
if (lastRoute) require_api_page_pageAPI.page.setCurrentRoute(lastRoute);
|
|
41
45
|
}
|
|
42
46
|
return (0, react.createElement)(WrappedComponent, props);
|
|
43
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withMXLRouting.cjs","names":["getNavigationInstrumentation"],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport type React from 'react';\nimport { createElement } from 'react';\nimport type { Route } from '../../../../../api-page/manager/types';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { RoutesFunctionalComponentReturn } from './types';\n\n// Routes can be nested, we need to traverse the routeContext to find the last route\nconst getLastRoute = (\n matchedComponent: RoutesFunctionalComponentReturn,\n lastRoute: Route | null,\n): Route | null => {\n if (!matchedComponent.props.match?.route) {\n return null;\n }\n\n const childPath = matchedComponent.props.match.route.path;\n const path =\n lastRoute && !childPath.startsWith('/')\n ? `${lastRoute.path}/${childPath}`\n : childPath;\n\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(matchedComponent.props.routeContext.outlet, {\n path,\n url: matchedComponent.props.match.pathname,\n });\n }\n\n return {\n path,\n url: matchedComponent.props.match.pathname,\n };\n};\n\nexport const withMXLRouting = <P extends object>(\n WrappedComponent: React.FunctionComponent<P>,\n) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Declarative,\n );\n\n const RoutesWithMXLRouting: React.FC<P> = (props: P) => {\n /**\n * React-router v6+ implementation is very different from v5\n * It doesn't have a <Switch> component that injects props into <Route>\n * Instead, it has <Routes> which internally calculates the matched route\n * and returns it as a children, <Route> cannot be wrapped since it requires all children to be a <Route> component\n * here we rely on that matching to get the current route.\n * It's not ideal to rely on internal implementation details, but it's the easier way of getting the current route\n * without having to manually match it or using hooks on each children component\n *\n * See: https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/hooks.tsx#L553\n */\n const matchedComponent = WrappedComponent(\n props,\n ) as unknown as RoutesFunctionalComponentReturn;\n\n if (matchedComponent.props.match?.route) {\n const lastRoute = getLastRoute(matchedComponent, null);\n if (lastRoute) {\n
|
|
1
|
+
{"version":3,"file":"withMXLRouting.cjs","names":["getNavigationInstrumentation"],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport type React from 'react';\nimport { createElement } from 'react';\nimport type { Route } from '../../../../../api-page/manager/types';\nimport { page } from '../../../../../api-page/pageAPI';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { RoutesFunctionalComponentReturn } from './types';\n\n// Routes can be nested, we need to traverse the routeContext to find the last route\nconst getLastRoute = (\n matchedComponent: RoutesFunctionalComponentReturn,\n lastRoute: Route | null,\n): Route | null => {\n if (!matchedComponent.props.match?.route) {\n return null;\n }\n\n const childPath = matchedComponent.props.match.route.path;\n if (!childPath) {\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(\n matchedComponent.props.routeContext.outlet,\n lastRoute,\n );\n }\n return lastRoute;\n }\n\n const path =\n lastRoute?.path && !childPath.startsWith('/')\n ? `${lastRoute.path}/${childPath}`\n : childPath;\n\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(matchedComponent.props.routeContext.outlet, {\n path,\n url: matchedComponent.props.match.pathname,\n });\n }\n\n return {\n path,\n url: matchedComponent.props.match.pathname,\n };\n};\n\nexport const withMXLRouting = <P extends object>(\n WrappedComponent: React.FunctionComponent<P>,\n) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Declarative,\n );\n\n const RoutesWithMXLRouting: React.FC<P> = (props: P) => {\n /**\n * React-router v6+ implementation is very different from v5\n * It doesn't have a <Switch> component that injects props into <Route>\n * Instead, it has <Routes> which internally calculates the matched route\n * and returns it as a children, <Route> cannot be wrapped since it requires all children to be a <Route> component\n * here we rely on that matching to get the current route.\n * It's not ideal to rely on internal implementation details, but it's the easier way of getting the current route\n * without having to manually match it or using hooks on each children component\n *\n * See: https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/hooks.tsx#L553\n */\n const matchedComponent = WrappedComponent(\n props,\n ) as unknown as RoutesFunctionalComponentReturn;\n\n if (matchedComponent.props.match?.route) {\n const lastRoute = getLastRoute(matchedComponent, null);\n if (lastRoute) {\n page.setCurrentRoute(lastRoute);\n }\n }\n\n return createElement<P>(WrappedComponent, props);\n };\n\n // Keep wrapped component metadata\n RoutesWithMXLRouting.displayName = `withMXLRouting(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`;\n hoistNonReactStatics(RoutesWithMXLRouting, WrappedComponent);\n\n return RoutesWithMXLRouting;\n};\n"],"mappings":";;;;;;;;;AAUA,MAAM,gBACJ,kBACA,cACiB;AACjB,KAAI,CAAC,iBAAiB,MAAM,OAAO,MACjC,QAAO;CAGT,MAAM,YAAY,iBAAiB,MAAM,MAAM,MAAM;AACrD,KAAI,CAAC,WAAW;AACd,MAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aACL,iBAAiB,MAAM,aAAa,QACpC,UACD;AAEH,SAAO;;CAGT,MAAM,OACJ,WAAW,QAAQ,CAAC,UAAU,WAAW,IAAI,GACzC,GAAG,UAAU,KAAK,GAAG,cACrB;AAEN,KAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aAAa,iBAAiB,MAAM,aAAa,QAAQ;EAC9D;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC,CAAC;AAGJ,QAAO;EACL;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC;;AAGH,MAAa,kBACX,qBACG;AAC+BA,wEAAAA,8BACT,CAAC,uBAAA,2BAEzB;CAED,MAAM,wBAAqC,UAAa;;;;;;;;;;;;EAYtD,MAAM,mBAAmB,iBACvB,MACD;AAED,MAAI,iBAAiB,MAAM,OAAO,OAAO;GACvC,MAAM,YAAY,aAAa,kBAAkB,KAAK;AACtD,OAAI,UACF,0BAAA,KAAK,gBAAgB,UAAU;;AAInC,UAAA,GAAA,MAAA,eAAwB,kBAAkB,MAAM;;AAIlD,sBAAqB,cAAc,kBAAkB,iBAAiB,eAAe,iBAAiB,QAAQ,YAAY;AAC1H,EAAA,GAAA,mCAAA,SAAqB,sBAAsB,iBAAiB;AAE5D,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withMXLRouting.d.cts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"withMXLRouting.d.cts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"mappings":";;;cA+Ca,cAAA,qBACX,gBAAA,EAAkB,KAAA,CAAM,iBAAA,CAAkB,CAAA,MAAE,KAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withMXLRouting.d.ts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"withMXLRouting.d.ts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"mappings":";;;cA+Ca,cAAA,qBACX,gBAAA,EAAkB,KAAA,CAAM,iBAAA,CAAkB,CAAA,MAAE,KAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __toESM } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { page } from "../../../../../api-page/pageAPI.js";
|
|
2
3
|
import "../../../../../constants/attributes.js";
|
|
3
4
|
import { getNavigationInstrumentation } from "../../instance.js";
|
|
4
5
|
import { require_hoist_non_react_statics_cjs } from "../../../../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";
|
|
@@ -8,7 +9,11 @@ var import_hoist_non_react_statics_cjs = /* @__PURE__ */ __toESM(require_hoist_n
|
|
|
8
9
|
const getLastRoute = (matchedComponent, lastRoute) => {
|
|
9
10
|
if (!matchedComponent.props.match?.route) return null;
|
|
10
11
|
const childPath = matchedComponent.props.match.route.path;
|
|
11
|
-
|
|
12
|
+
if (!childPath) {
|
|
13
|
+
if (matchedComponent.props.routeContext?.outlet) return getLastRoute(matchedComponent.props.routeContext.outlet, lastRoute);
|
|
14
|
+
return lastRoute;
|
|
15
|
+
}
|
|
16
|
+
const path = lastRoute?.path && !childPath.startsWith("/") ? `${lastRoute.path}/${childPath}` : childPath;
|
|
12
17
|
if (matchedComponent.props.routeContext?.outlet) return getLastRoute(matchedComponent.props.routeContext.outlet, {
|
|
13
18
|
path,
|
|
14
19
|
url: matchedComponent.props.match.pathname
|
|
@@ -19,8 +24,7 @@ const getLastRoute = (matchedComponent, lastRoute) => {
|
|
|
19
24
|
};
|
|
20
25
|
};
|
|
21
26
|
const withMXLRouting = (WrappedComponent) => {
|
|
22
|
-
|
|
23
|
-
navigationInstrumentation.setInstrumentationType("react_router_declarative");
|
|
27
|
+
getNavigationInstrumentation().setInstrumentationType("react_router_declarative");
|
|
24
28
|
const RoutesWithMXLRouting = (props) => {
|
|
25
29
|
/**
|
|
26
30
|
* React-router v6+ implementation is very different from v5
|
|
@@ -36,7 +40,7 @@ const withMXLRouting = (WrappedComponent) => {
|
|
|
36
40
|
const matchedComponent = WrappedComponent(props);
|
|
37
41
|
if (matchedComponent.props.match?.route) {
|
|
38
42
|
const lastRoute = getLastRoute(matchedComponent, null);
|
|
39
|
-
if (lastRoute)
|
|
43
|
+
if (lastRoute) page.setCurrentRoute(lastRoute);
|
|
40
44
|
}
|
|
41
45
|
return createElement(WrappedComponent, props);
|
|
42
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withMXLRouting.js","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport type React from 'react';\nimport { createElement } from 'react';\nimport type { Route } from '../../../../../api-page/manager/types';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { RoutesFunctionalComponentReturn } from './types';\n\n// Routes can be nested, we need to traverse the routeContext to find the last route\nconst getLastRoute = (\n matchedComponent: RoutesFunctionalComponentReturn,\n lastRoute: Route | null,\n): Route | null => {\n if (!matchedComponent.props.match?.route) {\n return null;\n }\n\n const childPath = matchedComponent.props.match.route.path;\n const path =\n lastRoute && !childPath.startsWith('/')\n ? `${lastRoute.path}/${childPath}`\n : childPath;\n\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(matchedComponent.props.routeContext.outlet, {\n path,\n url: matchedComponent.props.match.pathname,\n });\n }\n\n return {\n path,\n url: matchedComponent.props.match.pathname,\n };\n};\n\nexport const withMXLRouting = <P extends object>(\n WrappedComponent: React.FunctionComponent<P>,\n) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Declarative,\n );\n\n const RoutesWithMXLRouting: React.FC<P> = (props: P) => {\n /**\n * React-router v6+ implementation is very different from v5\n * It doesn't have a <Switch> component that injects props into <Route>\n * Instead, it has <Routes> which internally calculates the matched route\n * and returns it as a children, <Route> cannot be wrapped since it requires all children to be a <Route> component\n * here we rely on that matching to get the current route.\n * It's not ideal to rely on internal implementation details, but it's the easier way of getting the current route\n * without having to manually match it or using hooks on each children component\n *\n * See: https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/hooks.tsx#L553\n */\n const matchedComponent = WrappedComponent(\n props,\n ) as unknown as RoutesFunctionalComponentReturn;\n\n if (matchedComponent.props.match?.route) {\n const lastRoute = getLastRoute(matchedComponent, null);\n if (lastRoute) {\n
|
|
1
|
+
{"version":3,"file":"withMXLRouting.js","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport type React from 'react';\nimport { createElement } from 'react';\nimport type { Route } from '../../../../../api-page/manager/types';\nimport { page } from '../../../../../api-page/pageAPI';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { RoutesFunctionalComponentReturn } from './types';\n\n// Routes can be nested, we need to traverse the routeContext to find the last route\nconst getLastRoute = (\n matchedComponent: RoutesFunctionalComponentReturn,\n lastRoute: Route | null,\n): Route | null => {\n if (!matchedComponent.props.match?.route) {\n return null;\n }\n\n const childPath = matchedComponent.props.match.route.path;\n if (!childPath) {\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(\n matchedComponent.props.routeContext.outlet,\n lastRoute,\n );\n }\n return lastRoute;\n }\n\n const path =\n lastRoute?.path && !childPath.startsWith('/')\n ? `${lastRoute.path}/${childPath}`\n : childPath;\n\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(matchedComponent.props.routeContext.outlet, {\n path,\n url: matchedComponent.props.match.pathname,\n });\n }\n\n return {\n path,\n url: matchedComponent.props.match.pathname,\n };\n};\n\nexport const withMXLRouting = <P extends object>(\n WrappedComponent: React.FunctionComponent<P>,\n) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Declarative,\n );\n\n const RoutesWithMXLRouting: React.FC<P> = (props: P) => {\n /**\n * React-router v6+ implementation is very different from v5\n * It doesn't have a <Switch> component that injects props into <Route>\n * Instead, it has <Routes> which internally calculates the matched route\n * and returns it as a children, <Route> cannot be wrapped since it requires all children to be a <Route> component\n * here we rely on that matching to get the current route.\n * It's not ideal to rely on internal implementation details, but it's the easier way of getting the current route\n * without having to manually match it or using hooks on each children component\n *\n * See: https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/hooks.tsx#L553\n */\n const matchedComponent = WrappedComponent(\n props,\n ) as unknown as RoutesFunctionalComponentReturn;\n\n if (matchedComponent.props.match?.route) {\n const lastRoute = getLastRoute(matchedComponent, null);\n if (lastRoute) {\n page.setCurrentRoute(lastRoute);\n }\n }\n\n return createElement<P>(WrappedComponent, props);\n };\n\n // Keep wrapped component metadata\n RoutesWithMXLRouting.displayName = `withMXLRouting(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`;\n hoistNonReactStatics(RoutesWithMXLRouting, WrappedComponent);\n\n return RoutesWithMXLRouting;\n};\n"],"mappings":";;;;;;;;AAUA,MAAM,gBACJ,kBACA,cACiB;AACjB,KAAI,CAAC,iBAAiB,MAAM,OAAO,MACjC,QAAO;CAGT,MAAM,YAAY,iBAAiB,MAAM,MAAM,MAAM;AACrD,KAAI,CAAC,WAAW;AACd,MAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aACL,iBAAiB,MAAM,aAAa,QACpC,UACD;AAEH,SAAO;;CAGT,MAAM,OACJ,WAAW,QAAQ,CAAC,UAAU,WAAW,IAAI,GACzC,GAAG,UAAU,KAAK,GAAG,cACrB;AAEN,KAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aAAa,iBAAiB,MAAM,aAAa,QAAQ;EAC9D;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC,CAAC;AAGJ,QAAO;EACL;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC;;AAGH,MAAa,kBACX,qBACG;AAC+B,+BACT,CAAC,uBAAA,2BAEzB;CAED,MAAM,wBAAqC,UAAa;;;;;;;;;;;;EAYtD,MAAM,mBAAmB,iBACvB,MACD;AAED,MAAI,iBAAiB,MAAM,OAAO,OAAO;GACvC,MAAM,YAAY,aAAa,kBAAkB,KAAK;AACtD,OAAI,UACF,MAAK,gBAAgB,UAAU;;AAInC,SAAO,cAAiB,kBAAkB,MAAM;;AAIlD,sBAAqB,cAAc,kBAAkB,iBAAiB,eAAe,iBAAiB,QAAQ,YAAY;AAC1H,EAAA,GAAA,mCAAA,SAAqB,sBAAsB,iBAAiB;AAE5D,QAAO"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PageManager } from "../../../api-page/manager/types.cjs";
|
|
1
2
|
import { MXLInstrumentationBaseArgs } from "../../MXLInstrumentationBase/types.cjs";
|
|
2
3
|
|
|
3
4
|
//#region src/instrumentations/navigation/NavigationInstrumentation/types.d.ts
|
|
@@ -9,6 +10,7 @@ type NavigationInstrumentationArgs = Pick<MXLInstrumentationBaseArgs, 'diag'> &
|
|
|
9
10
|
* *default*: true
|
|
10
11
|
*/
|
|
11
12
|
shouldCleanupPathOptionsFromRouteName?: boolean;
|
|
13
|
+
pageManager?: PageManager;
|
|
12
14
|
};
|
|
13
15
|
//#endregion
|
|
14
16
|
export { NavigationInstrumentationArgs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../../../src/instrumentations/navigation/NavigationInstrumentation/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../../../src/instrumentations/navigation/NavigationInstrumentation/types.ts"],"mappings":";;;;KAEY,6BAAA,GAAgC,IAAA,CAC1C,0BAAA;;AADF;;;;;EAUE,qCAAA;EACA,WAAA,GAAc,WAAA;AAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PageManager } from "../../../api-page/manager/types.js";
|
|
1
2
|
import { MXLInstrumentationBaseArgs } from "../../MXLInstrumentationBase/types.js";
|
|
2
3
|
|
|
3
4
|
//#region src/instrumentations/navigation/NavigationInstrumentation/types.d.ts
|
|
@@ -9,6 +10,7 @@ type NavigationInstrumentationArgs = Pick<MXLInstrumentationBaseArgs, 'diag'> &
|
|
|
9
10
|
* *default*: true
|
|
10
11
|
*/
|
|
11
12
|
shouldCleanupPathOptionsFromRouteName?: boolean;
|
|
13
|
+
pageManager?: PageManager;
|
|
12
14
|
};
|
|
13
15
|
//#endregion
|
|
14
16
|
export { NavigationInstrumentationArgs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/instrumentations/navigation/NavigationInstrumentation/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/instrumentations/navigation/NavigationInstrumentation/types.ts"],"mappings":";;;;KAEY,6BAAA,GAAgC,IAAA,CAC1C,0BAAA;;AADF;;;;;EAUE,qCAAA;EACA,WAAA,GAAc,WAAA;AAAA"}
|
package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.cjs
CHANGED
|
@@ -4,10 +4,17 @@ const require_constants_attributes = require("../../../constants/attributes.cjs"
|
|
|
4
4
|
const require_instrumentations_MXLInstrumentationBase_MXLInstrumentationBase = require("../../MXLInstrumentationBase/MXLInstrumentationBase.cjs");
|
|
5
5
|
const require_utils_getSelector = require("../../../utils/getSelector.cjs");
|
|
6
6
|
const require_instrumentations_rage_click_RageClickInstrumentation_constants = require("./constants.cjs");
|
|
7
|
-
let
|
|
7
|
+
let _opentelemetry_api = require("@opentelemetry/api");
|
|
8
8
|
//#region src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts
|
|
9
9
|
var RageClickInstrumentation = class extends require_instrumentations_MXLInstrumentationBase_MXLInstrumentationBase.MXLInstrumentationBase {
|
|
10
10
|
_onClickHandler;
|
|
11
|
+
_flushHandler = () => {
|
|
12
|
+
try {
|
|
13
|
+
this._flush();
|
|
14
|
+
} catch (error) {
|
|
15
|
+
this._diag.error("failed to emit rage-click log", error);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
11
18
|
_eventWindow = null;
|
|
12
19
|
constructor({ diag, perf } = {}) {
|
|
13
20
|
super({
|
|
@@ -24,14 +31,14 @@ var RageClickInstrumentation = class extends require_instrumentations_MXLInstrum
|
|
|
24
31
|
this._diag.error("failed to process rage-click candidate", error);
|
|
25
32
|
}
|
|
26
33
|
};
|
|
27
|
-
if (this._config.enabled) this.enable();
|
|
28
34
|
}
|
|
29
35
|
onDisable() {
|
|
30
36
|
document.removeEventListener("click", this._onClickHandler);
|
|
31
|
-
this.
|
|
37
|
+
this._flushHandler();
|
|
32
38
|
}
|
|
33
39
|
onEnable() {
|
|
34
40
|
document.addEventListener("click", this._onClickHandler);
|
|
41
|
+
this.setSessionPartListeners({ end: this._flushHandler });
|
|
35
42
|
}
|
|
36
43
|
_handleClick(event) {
|
|
37
44
|
if (!(event.target instanceof Element)) return;
|
|
@@ -45,13 +52,7 @@ var RageClickInstrumentation = class extends require_instrumentations_MXLInstrum
|
|
|
45
52
|
count: 1,
|
|
46
53
|
interactionType,
|
|
47
54
|
timestamp: event.timeStamp,
|
|
48
|
-
timeoutId:
|
|
49
|
-
try {
|
|
50
|
-
this._flush();
|
|
51
|
-
} catch (error) {
|
|
52
|
-
this._diag.error("failed to emit rage-click log", error);
|
|
53
|
-
}
|
|
54
|
-
}, 500)
|
|
55
|
+
timeoutId: setTimeout(this._flushHandler, 500)
|
|
55
56
|
};
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
@@ -63,13 +64,13 @@ var RageClickInstrumentation = class extends require_instrumentations_MXLInstrum
|
|
|
63
64
|
_flush() {
|
|
64
65
|
if (this._eventWindow === null) return;
|
|
65
66
|
const eventWindow = this._eventWindow;
|
|
66
|
-
|
|
67
|
+
clearTimeout(eventWindow.timeoutId);
|
|
67
68
|
this._eventWindow = null;
|
|
68
69
|
if (eventWindow.count < 3) return;
|
|
69
70
|
this.logger.emit({
|
|
70
|
-
timestamp: this.perf.
|
|
71
|
+
timestamp: this.perf.offsetToAbsoluteTime(eventWindow.timestamp),
|
|
71
72
|
eventName: require_instrumentations_rage_click_RageClickInstrumentation_constants.RAGE_CLICK_EVENT_NAME,
|
|
72
|
-
severityNumber:
|
|
73
|
+
severityNumber: _opentelemetry_api.SeverityNumber.INFO,
|
|
73
74
|
attributes: {
|
|
74
75
|
[require_constants_attributes.KEY_MXL_TYPE]: "mxl.otel_log",
|
|
75
76
|
[require_instrumentations_rage_click_RageClickInstrumentation_constants.ATTR_RAGE_CLICK_ELEMENT_TYPE]: eventWindow.target.tagName.toLowerCase(),
|
package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RageClickInstrumentation.cjs","names":["MXLInstrumentationBase","RAGE_CLICK_EVENT_NAME","SeverityNumber","KEY_MXL_TYPE","ATTR_RAGE_CLICK_ELEMENT_TYPE","ATTR_RAGE_CLICK_ELEMENT_SELECTOR","getSelector","ATTR_RAGE_CLICK_X","ATTR_RAGE_CLICK_Y","ATTR_RAGE_CLICK_COUNT","ATTR_RAGE_CLICK_INTERACTION_TYPE"],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"sourcesContent":["import { SeverityNumber } from '@opentelemetry/api
|
|
1
|
+
{"version":3,"file":"RageClickInstrumentation.cjs","names":["MXLInstrumentationBase","RAGE_CLICK_EVENT_NAME","SeverityNumber","KEY_MXL_TYPE","ATTR_RAGE_CLICK_ELEMENT_TYPE","ATTR_RAGE_CLICK_ELEMENT_SELECTOR","getSelector","ATTR_RAGE_CLICK_X","ATTR_RAGE_CLICK_Y","ATTR_RAGE_CLICK_COUNT","ATTR_RAGE_CLICK_INTERACTION_TYPE"],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"sourcesContent":["import { SeverityNumber } from '@opentelemetry/api';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../../constants/attributes';\nimport { getSelector } from '../../../utils/getSelector';\nimport type { TimeoutRef } from '../../../utils/timeout/types';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport type { InteractionType } from './constants';\nimport {\n ATTR_RAGE_CLICK_COUNT,\n ATTR_RAGE_CLICK_ELEMENT_SELECTOR,\n ATTR_RAGE_CLICK_ELEMENT_TYPE,\n ATTR_RAGE_CLICK_INTERACTION_TYPE,\n ATTR_RAGE_CLICK_X,\n ATTR_RAGE_CLICK_Y,\n RAGE_CLICK_EVENT_NAME,\n RAGE_CLICK_RADIUS,\n RAGE_CLICK_THRESHOLD,\n RAGE_CLICK_WINDOW_TIME,\n} from './constants';\nimport type { RageClickInstrumentationArgs } from './types';\n\ninterface RageClickWindow {\n target: Element;\n x: number;\n y: number;\n count: number;\n interactionType: InteractionType;\n timestamp: number;\n timeoutId: TimeoutRef;\n}\n\nexport class RageClickInstrumentation extends MXLInstrumentationBase {\n private readonly _onClickHandler: (event: MouseEvent) => void;\n private readonly _flushHandler = (): void => {\n try {\n this._flush();\n } catch (error) {\n this._diag.error('failed to emit rage-click log', error);\n }\n };\n private _eventWindow: RageClickWindow | null = null;\n\n public constructor({ diag, perf }: RageClickInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'RageClickInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n\n this._onClickHandler = (event: MouseEvent): void => {\n try {\n this._handleClick(event);\n } catch (error) {\n this._diag.error('failed to process rage-click candidate', error);\n }\n };\n }\n\n protected override onDisable(): void {\n document.removeEventListener('click', this._onClickHandler);\n this._flushHandler();\n }\n\n protected override onEnable(): void {\n document.addEventListener('click', this._onClickHandler);\n this.setSessionPartListeners({ end: this._flushHandler });\n }\n\n private _handleClick(event: MouseEvent): void {\n if (!(event.target instanceof Element)) {\n return;\n }\n\n const target = event.target;\n const interactionType: InteractionType =\n event instanceof PointerEvent && event.pointerType === 'touch'\n ? 'tap'\n : 'click';\n\n if (this._eventWindow === null) {\n this._eventWindow = {\n target,\n x: event.clientX,\n y: event.clientY,\n count: 1,\n interactionType,\n timestamp: event.timeStamp,\n timeoutId: setTimeout(this._flushHandler, RAGE_CLICK_WINDOW_TIME),\n };\n\n return;\n }\n\n const sameTarget = target === this._eventWindow.target;\n const dx = Math.abs(event.clientX - this._eventWindow.x);\n const dy = Math.abs(event.clientY - this._eventWindow.y);\n const withinRadius = dx <= RAGE_CLICK_RADIUS && dy <= RAGE_CLICK_RADIUS;\n\n if (sameTarget || withinRadius) {\n this._eventWindow.count += 1;\n }\n }\n\n private _flush(): void {\n if (this._eventWindow === null) {\n return;\n }\n\n const eventWindow = this._eventWindow;\n\n clearTimeout(eventWindow.timeoutId);\n this._eventWindow = null;\n\n if (eventWindow.count < RAGE_CLICK_THRESHOLD) {\n return;\n }\n\n this.logger.emit({\n timestamp: this.perf.offsetToAbsoluteTime(eventWindow.timestamp),\n eventName: RAGE_CLICK_EVENT_NAME,\n severityNumber: SeverityNumber.INFO,\n attributes: {\n [KEY_MXL_TYPE]: MXL_TYPES.OTelLog,\n [ATTR_RAGE_CLICK_ELEMENT_TYPE]:\n eventWindow.target.tagName.toLowerCase(),\n [ATTR_RAGE_CLICK_ELEMENT_SELECTOR]: getSelector(eventWindow.target),\n [ATTR_RAGE_CLICK_X]: eventWindow.x,\n [ATTR_RAGE_CLICK_Y]: eventWindow.y,\n [ATTR_RAGE_CLICK_COUNT]: eventWindow.count,\n [ATTR_RAGE_CLICK_INTERACTION_TYPE]: eventWindow.interactionType,\n },\n });\n }\n}\n"],"mappings":";;;;;;;;AA8BA,IAAa,2BAAb,cAA8CA,uEAAAA,uBAAuB;CACnE;CACA,sBAA6C;AAC3C,MAAI;AACF,QAAK,QAAQ;WACN,OAAO;AACd,QAAK,MAAM,MAAM,iCAAiC,MAAM;;;CAG5D,eAA+C;CAE/C,YAAmB,EAAE,MAAM,SAAuC,EAAE,EAAE;AACpE,QAAM;GACJ,QAAQ,EAAE;GACV;GACA,qBAAqB;GACrB,wBAAwB;GACxB;GACD,CAAC;AAEF,OAAK,mBAAmB,UAA4B;AAClD,OAAI;AACF,SAAK,aAAa,MAAM;YACjB,OAAO;AACd,SAAK,MAAM,MAAM,0CAA0C,MAAM;;;;CAKvE,YAAqC;AACnC,WAAS,oBAAoB,SAAS,KAAK,gBAAgB;AAC3D,OAAK,eAAe;;CAGtB,WAAoC;AAClC,WAAS,iBAAiB,SAAS,KAAK,gBAAgB;AACxD,OAAK,wBAAwB,EAAE,KAAK,KAAK,eAAe,CAAC;;CAG3D,aAAqB,OAAyB;AAC5C,MAAI,EAAE,MAAM,kBAAkB,SAC5B;EAGF,MAAM,SAAS,MAAM;EACrB,MAAM,kBACJ,iBAAiB,gBAAgB,MAAM,gBAAgB,UACnD,QACA;AAEN,MAAI,KAAK,iBAAiB,MAAM;AAC9B,QAAK,eAAe;IAClB;IACA,GAAG,MAAM;IACT,GAAG,MAAM;IACT,OAAO;IACP;IACA,WAAW,MAAM;IACjB,WAAW,WAAW,KAAK,eAAA,IAAsC;IAClE;AAED;;EAGF,MAAM,aAAa,WAAW,KAAK,aAAa;EAChD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;EACxD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;AAGxD,MAAI,cAFiB,MAAA,MAA2B,MAAA,GAG9C,MAAK,aAAa,SAAS;;CAI/B,SAAuB;AACrB,MAAI,KAAK,iBAAiB,KACxB;EAGF,MAAM,cAAc,KAAK;AAEzB,eAAa,YAAY,UAAU;AACnC,OAAK,eAAe;AAEpB,MAAI,YAAY,QAAA,EACd;AAGF,OAAK,OAAO,KAAK;GACf,WAAW,KAAK,KAAK,qBAAqB,YAAY,UAAU;GAChE,WAAWC,uEAAAA;GACX,gBAAgBC,mBAAAA,eAAe;GAC/B,YAAY;KACTC,6BAAAA,eAAAA;KACAC,uEAAAA,+BACC,YAAY,OAAO,QAAQ,aAAa;KACzCC,uEAAAA,mCAAmCC,0BAAAA,YAAY,YAAY,OAAO;KAClEC,uEAAAA,oBAAoB,YAAY;KAChCC,uEAAAA,oBAAoB,YAAY;KAChCC,uEAAAA,wBAAwB,YAAY;KACpCC,uEAAAA,mCAAmC,YAAY;IACjD;GACF,CAAC"}
|
package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.cts
CHANGED
|
@@ -4,6 +4,7 @@ import { MXLInstrumentationBase } from "../../MXLInstrumentationBase/MXLInstrume
|
|
|
4
4
|
//#region src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts
|
|
5
5
|
declare class RageClickInstrumentation extends MXLInstrumentationBase {
|
|
6
6
|
private readonly _onClickHandler;
|
|
7
|
+
private readonly _flushHandler;
|
|
7
8
|
private _eventWindow;
|
|
8
9
|
constructor({
|
|
9
10
|
diag,
|
package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RageClickInstrumentation.d.cts","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"RageClickInstrumentation.d.cts","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"mappings":";;;;cA8Ba,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,eAAA;EAAA,iBACA,aAAA;EAAA,QAOT,YAAA;;IAEa,IAAA;IAAM;EAAA,IAAQ,4BAAA;EAAA,UAkBhB,SAAA,CAAA;EAAA,UAKA,QAAA,CAAA;EAAA,QAKX,YAAA;EAAA,QAmCA,MAAA;AAAA"}
|
package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { MXLInstrumentationBase } from "../../MXLInstrumentationBase/MXLInstrume
|
|
|
4
4
|
//#region src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts
|
|
5
5
|
declare class RageClickInstrumentation extends MXLInstrumentationBase {
|
|
6
6
|
private readonly _onClickHandler;
|
|
7
|
+
private readonly _flushHandler;
|
|
7
8
|
private _eventWindow;
|
|
8
9
|
constructor({
|
|
9
10
|
diag,
|
package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RageClickInstrumentation.d.ts","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"RageClickInstrumentation.d.ts","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"mappings":";;;;cA8Ba,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,eAAA;EAAA,iBACA,aAAA;EAAA,QAOT,YAAA;;IAEa,IAAA;IAAM;EAAA,IAAQ,4BAAA;EAAA,UAkBhB,SAAA,CAAA;EAAA,UAKA,QAAA,CAAA;EAAA,QAKX,YAAA;EAAA,QAmCA,MAAA;AAAA"}
|
package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.js
CHANGED
|
@@ -2,10 +2,17 @@ import { KEY_MXL_TYPE } from "../../../constants/attributes.js";
|
|
|
2
2
|
import { MXLInstrumentationBase } from "../../MXLInstrumentationBase/MXLInstrumentationBase.js";
|
|
3
3
|
import { getSelector } from "../../../utils/getSelector.js";
|
|
4
4
|
import { ATTR_RAGE_CLICK_COUNT, ATTR_RAGE_CLICK_ELEMENT_SELECTOR, ATTR_RAGE_CLICK_ELEMENT_TYPE, ATTR_RAGE_CLICK_INTERACTION_TYPE, ATTR_RAGE_CLICK_X, ATTR_RAGE_CLICK_Y, RAGE_CLICK_EVENT_NAME } from "./constants.js";
|
|
5
|
-
import { SeverityNumber } from "@opentelemetry/api
|
|
5
|
+
import { SeverityNumber } from "@opentelemetry/api";
|
|
6
6
|
//#region src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts
|
|
7
7
|
var RageClickInstrumentation = class extends MXLInstrumentationBase {
|
|
8
8
|
_onClickHandler;
|
|
9
|
+
_flushHandler = () => {
|
|
10
|
+
try {
|
|
11
|
+
this._flush();
|
|
12
|
+
} catch (error) {
|
|
13
|
+
this._diag.error("failed to emit rage-click log", error);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
9
16
|
_eventWindow = null;
|
|
10
17
|
constructor({ diag, perf } = {}) {
|
|
11
18
|
super({
|
|
@@ -22,14 +29,14 @@ var RageClickInstrumentation = class extends MXLInstrumentationBase {
|
|
|
22
29
|
this._diag.error("failed to process rage-click candidate", error);
|
|
23
30
|
}
|
|
24
31
|
};
|
|
25
|
-
if (this._config.enabled) this.enable();
|
|
26
32
|
}
|
|
27
33
|
onDisable() {
|
|
28
34
|
document.removeEventListener("click", this._onClickHandler);
|
|
29
|
-
this.
|
|
35
|
+
this._flushHandler();
|
|
30
36
|
}
|
|
31
37
|
onEnable() {
|
|
32
38
|
document.addEventListener("click", this._onClickHandler);
|
|
39
|
+
this.setSessionPartListeners({ end: this._flushHandler });
|
|
33
40
|
}
|
|
34
41
|
_handleClick(event) {
|
|
35
42
|
if (!(event.target instanceof Element)) return;
|
|
@@ -43,13 +50,7 @@ var RageClickInstrumentation = class extends MXLInstrumentationBase {
|
|
|
43
50
|
count: 1,
|
|
44
51
|
interactionType,
|
|
45
52
|
timestamp: event.timeStamp,
|
|
46
|
-
timeoutId:
|
|
47
|
-
try {
|
|
48
|
-
this._flush();
|
|
49
|
-
} catch (error) {
|
|
50
|
-
this._diag.error("failed to emit rage-click log", error);
|
|
51
|
-
}
|
|
52
|
-
}, 500)
|
|
53
|
+
timeoutId: setTimeout(this._flushHandler, 500)
|
|
53
54
|
};
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
@@ -61,11 +62,11 @@ var RageClickInstrumentation = class extends MXLInstrumentationBase {
|
|
|
61
62
|
_flush() {
|
|
62
63
|
if (this._eventWindow === null) return;
|
|
63
64
|
const eventWindow = this._eventWindow;
|
|
64
|
-
|
|
65
|
+
clearTimeout(eventWindow.timeoutId);
|
|
65
66
|
this._eventWindow = null;
|
|
66
67
|
if (eventWindow.count < 3) return;
|
|
67
68
|
this.logger.emit({
|
|
68
|
-
timestamp: this.perf.
|
|
69
|
+
timestamp: this.perf.offsetToAbsoluteTime(eventWindow.timestamp),
|
|
69
70
|
eventName: RAGE_CLICK_EVENT_NAME,
|
|
70
71
|
severityNumber: SeverityNumber.INFO,
|
|
71
72
|
attributes: {
|
package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RageClickInstrumentation.js","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"sourcesContent":["import { SeverityNumber } from '@opentelemetry/api
|
|
1
|
+
{"version":3,"file":"RageClickInstrumentation.js","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"sourcesContent":["import { SeverityNumber } from '@opentelemetry/api';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../../constants/attributes';\nimport { getSelector } from '../../../utils/getSelector';\nimport type { TimeoutRef } from '../../../utils/timeout/types';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport type { InteractionType } from './constants';\nimport {\n ATTR_RAGE_CLICK_COUNT,\n ATTR_RAGE_CLICK_ELEMENT_SELECTOR,\n ATTR_RAGE_CLICK_ELEMENT_TYPE,\n ATTR_RAGE_CLICK_INTERACTION_TYPE,\n ATTR_RAGE_CLICK_X,\n ATTR_RAGE_CLICK_Y,\n RAGE_CLICK_EVENT_NAME,\n RAGE_CLICK_RADIUS,\n RAGE_CLICK_THRESHOLD,\n RAGE_CLICK_WINDOW_TIME,\n} from './constants';\nimport type { RageClickInstrumentationArgs } from './types';\n\ninterface RageClickWindow {\n target: Element;\n x: number;\n y: number;\n count: number;\n interactionType: InteractionType;\n timestamp: number;\n timeoutId: TimeoutRef;\n}\n\nexport class RageClickInstrumentation extends MXLInstrumentationBase {\n private readonly _onClickHandler: (event: MouseEvent) => void;\n private readonly _flushHandler = (): void => {\n try {\n this._flush();\n } catch (error) {\n this._diag.error('failed to emit rage-click log', error);\n }\n };\n private _eventWindow: RageClickWindow | null = null;\n\n public constructor({ diag, perf }: RageClickInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'RageClickInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n\n this._onClickHandler = (event: MouseEvent): void => {\n try {\n this._handleClick(event);\n } catch (error) {\n this._diag.error('failed to process rage-click candidate', error);\n }\n };\n }\n\n protected override onDisable(): void {\n document.removeEventListener('click', this._onClickHandler);\n this._flushHandler();\n }\n\n protected override onEnable(): void {\n document.addEventListener('click', this._onClickHandler);\n this.setSessionPartListeners({ end: this._flushHandler });\n }\n\n private _handleClick(event: MouseEvent): void {\n if (!(event.target instanceof Element)) {\n return;\n }\n\n const target = event.target;\n const interactionType: InteractionType =\n event instanceof PointerEvent && event.pointerType === 'touch'\n ? 'tap'\n : 'click';\n\n if (this._eventWindow === null) {\n this._eventWindow = {\n target,\n x: event.clientX,\n y: event.clientY,\n count: 1,\n interactionType,\n timestamp: event.timeStamp,\n timeoutId: setTimeout(this._flushHandler, RAGE_CLICK_WINDOW_TIME),\n };\n\n return;\n }\n\n const sameTarget = target === this._eventWindow.target;\n const dx = Math.abs(event.clientX - this._eventWindow.x);\n const dy = Math.abs(event.clientY - this._eventWindow.y);\n const withinRadius = dx <= RAGE_CLICK_RADIUS && dy <= RAGE_CLICK_RADIUS;\n\n if (sameTarget || withinRadius) {\n this._eventWindow.count += 1;\n }\n }\n\n private _flush(): void {\n if (this._eventWindow === null) {\n return;\n }\n\n const eventWindow = this._eventWindow;\n\n clearTimeout(eventWindow.timeoutId);\n this._eventWindow = null;\n\n if (eventWindow.count < RAGE_CLICK_THRESHOLD) {\n return;\n }\n\n this.logger.emit({\n timestamp: this.perf.offsetToAbsoluteTime(eventWindow.timestamp),\n eventName: RAGE_CLICK_EVENT_NAME,\n severityNumber: SeverityNumber.INFO,\n attributes: {\n [KEY_MXL_TYPE]: MXL_TYPES.OTelLog,\n [ATTR_RAGE_CLICK_ELEMENT_TYPE]:\n eventWindow.target.tagName.toLowerCase(),\n [ATTR_RAGE_CLICK_ELEMENT_SELECTOR]: getSelector(eventWindow.target),\n [ATTR_RAGE_CLICK_X]: eventWindow.x,\n [ATTR_RAGE_CLICK_Y]: eventWindow.y,\n [ATTR_RAGE_CLICK_COUNT]: eventWindow.count,\n [ATTR_RAGE_CLICK_INTERACTION_TYPE]: eventWindow.interactionType,\n },\n });\n }\n}\n"],"mappings":";;;;;;AA8BA,IAAa,2BAAb,cAA8C,uBAAuB;CACnE;CACA,sBAA6C;AAC3C,MAAI;AACF,QAAK,QAAQ;WACN,OAAO;AACd,QAAK,MAAM,MAAM,iCAAiC,MAAM;;;CAG5D,eAA+C;CAE/C,YAAmB,EAAE,MAAM,SAAuC,EAAE,EAAE;AACpE,QAAM;GACJ,QAAQ,EAAE;GACV;GACA,qBAAqB;GACrB,wBAAwB;GACxB;GACD,CAAC;AAEF,OAAK,mBAAmB,UAA4B;AAClD,OAAI;AACF,SAAK,aAAa,MAAM;YACjB,OAAO;AACd,SAAK,MAAM,MAAM,0CAA0C,MAAM;;;;CAKvE,YAAqC;AACnC,WAAS,oBAAoB,SAAS,KAAK,gBAAgB;AAC3D,OAAK,eAAe;;CAGtB,WAAoC;AAClC,WAAS,iBAAiB,SAAS,KAAK,gBAAgB;AACxD,OAAK,wBAAwB,EAAE,KAAK,KAAK,eAAe,CAAC;;CAG3D,aAAqB,OAAyB;AAC5C,MAAI,EAAE,MAAM,kBAAkB,SAC5B;EAGF,MAAM,SAAS,MAAM;EACrB,MAAM,kBACJ,iBAAiB,gBAAgB,MAAM,gBAAgB,UACnD,QACA;AAEN,MAAI,KAAK,iBAAiB,MAAM;AAC9B,QAAK,eAAe;IAClB;IACA,GAAG,MAAM;IACT,GAAG,MAAM;IACT,OAAO;IACP;IACA,WAAW,MAAM;IACjB,WAAW,WAAW,KAAK,eAAA,IAAsC;IAClE;AAED;;EAGF,MAAM,aAAa,WAAW,KAAK,aAAa;EAChD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;EACxD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;AAGxD,MAAI,cAFiB,MAAA,MAA2B,MAAA,GAG9C,MAAK,aAAa,SAAS;;CAI/B,SAAuB;AACrB,MAAI,KAAK,iBAAiB,KACxB;EAGF,MAAM,cAAc,KAAK;AAEzB,eAAa,YAAY,UAAU;AACnC,OAAK,eAAe;AAEpB,MAAI,YAAY,QAAA,EACd;AAGF,OAAK,OAAO,KAAK;GACf,WAAW,KAAK,KAAK,qBAAqB,YAAY,UAAU;GAChE,WAAW;GACX,gBAAgB,eAAe;GAC/B,YAAY;KACT,eAAA;KACA,+BACC,YAAY,OAAO,QAAQ,aAAa;KACzC,mCAAmC,YAAY,YAAY,OAAO;KAClE,oBAAoB,YAAY;KAChC,oBAAoB,YAAY;KAChC,wBAAwB,YAAY;KACpC,mCAAmC,YAAY;IACjD;GACF,CAAC"}
|
|
@@ -17,12 +17,10 @@ var ReplayInstrumentation = class extends require_instrumentations_MXLInstrument
|
|
|
17
17
|
});
|
|
18
18
|
this._args = args;
|
|
19
19
|
if (!args.replayContext || !args.sessionStorage) this._diag.warn("replayContext and sessionStorage are required for session recording");
|
|
20
|
-
if (!this._config.enabled) this._diag.debug("disabled, not starting");
|
|
21
20
|
}
|
|
22
21
|
setUserSessionManager(userSessionManager) {
|
|
23
22
|
super.setUserSessionManager(userSessionManager);
|
|
24
23
|
this._ensureSessionRecording();
|
|
25
|
-
if (this._config.enabled && this._args.autoStart !== false && this._args.replayContext && this._args.sessionStorage) this.enable();
|
|
26
24
|
}
|
|
27
25
|
_ensureSessionRecording() {
|
|
28
26
|
if (this._sessionRecording) return this._sessionRecording;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReplayInstrumentation.cjs","names":["MXLInstrumentationBase","SessionRecording"],"sources":["../../../../src/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.ts"],"sourcesContent":["import { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport { SessionRecording } from '../session-recording/SessionRecording';\nimport type { ReplayInstrumentationArgs } from './types';\n\nexport class ReplayInstrumentation extends MXLInstrumentationBase {\n private readonly _args: ReplayInstrumentationArgs;\n private _sessionRecording: SessionRecording | undefined;\n private _wasPaused = false;\n private _stopPromise: Promise<void> | undefined;\n\n public constructor(args: ReplayInstrumentationArgs = {}) {\n super({\n config: {},\n diag: args.diag,\n instrumentationName: 'ReplayInstrumentation',\n instrumentationVersion: '2.0.0',\n perf: args.perf,\n });\n\n this._args = args;\n\n if (!args.replayContext || !args.sessionStorage) {\n this._diag.warn(\n 'replayContext and sessionStorage are required for session recording',\n );\n }\n
|
|
1
|
+
{"version":3,"file":"ReplayInstrumentation.cjs","names":["MXLInstrumentationBase","SessionRecording"],"sources":["../../../../src/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.ts"],"sourcesContent":["import { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport { SessionRecording } from '../session-recording/SessionRecording';\nimport type { ReplayInstrumentationArgs } from './types';\n\nexport class ReplayInstrumentation extends MXLInstrumentationBase {\n private readonly _args: ReplayInstrumentationArgs;\n private _sessionRecording: SessionRecording | undefined;\n private _wasPaused = false;\n private _stopPromise: Promise<void> | undefined;\n\n public constructor(args: ReplayInstrumentationArgs = {}) {\n super({\n config: {},\n diag: args.diag,\n instrumentationName: 'ReplayInstrumentation',\n instrumentationVersion: '2.0.0',\n perf: args.perf,\n });\n\n this._args = args;\n\n if (!args.replayContext || !args.sessionStorage) {\n this._diag.warn(\n 'replayContext and sessionStorage are required for session recording',\n );\n }\n }\n\n public override setUserSessionManager(\n userSessionManager: Parameters<\n MXLInstrumentationBase['setUserSessionManager']\n >[0],\n ): void {\n super.setUserSessionManager(userSessionManager);\n this._ensureSessionRecording();\n }\n\n private _ensureSessionRecording(): SessionRecording | undefined {\n if (this._sessionRecording) {\n return this._sessionRecording;\n }\n\n const {\n replayContext,\n sessionStorage,\n autoStart,\n rrwebOptions,\n visibilityDoc,\n } = this._args;\n\n if (!replayContext || !sessionStorage) {\n return undefined;\n }\n\n this._sessionRecording = new SessionRecording({\n context: replayContext,\n diag: this._diag,\n autoStart,\n rrwebOptions,\n sessionStorage,\n userSessionManager: this.userSessionManager,\n visibilityDoc,\n });\n\n return this._sessionRecording;\n }\n\n public isRecording(): boolean {\n return this._sessionRecording?.isRecording() ?? false;\n }\n\n // Repeat calls are meaningful here (`force` restarts a stopped recording),\n // so replay bypasses the base class's idempotency gate.\n public override enable(options?: { force?: boolean }): void {\n this._isEnabled = true;\n this._startRecording(options);\n }\n\n protected override onEnable(): void {\n this._startRecording();\n }\n\n private _startRecording(options?: { force?: boolean }): void {\n this._wasPaused = false;\n this._afterPendingStop(() => {\n this._ensureSessionRecording()?.enable(options);\n });\n }\n\n public pause(): void {\n this._wasPaused = true;\n this._sessionRecording?.pause();\n }\n\n public resume(): void {\n if (!this._wasPaused) {\n this.enable({ force: true });\n return;\n }\n this._afterPendingStop(() => {\n this._sessionRecording?.resume();\n this._wasPaused = false;\n });\n }\n\n private _afterPendingStop(action: () => void): void {\n if (this._stopPromise) {\n void this._stopPromise.then(action);\n return;\n }\n action();\n }\n\n protected override onDisable(): void {\n const recording = this._sessionRecording;\n if (!recording) {\n return;\n }\n\n this._stopPromise = recording.stop().finally(() => {\n if (this._sessionRecording === recording) {\n this._sessionRecording = undefined;\n }\n this._stopPromise = undefined;\n });\n }\n\n /** Await in-flight disable teardown (tests / advanced callers). */\n public async waitForDisable(): Promise<void> {\n await this._stopPromise;\n }\n}\n"],"mappings":";;;;AAIA,IAAa,wBAAb,cAA2CA,uEAAAA,uBAAuB;CAChE;CACA;CACA,aAAqB;CACrB;CAEA,YAAmB,OAAkC,EAAE,EAAE;AACvD,QAAM;GACJ,QAAQ,EAAE;GACV,MAAM,KAAK;GACX,qBAAqB;GACrB,wBAAwB;GACxB,MAAM,KAAK;GACZ,CAAC;AAEF,OAAK,QAAQ;AAEb,MAAI,CAAC,KAAK,iBAAiB,CAAC,KAAK,eAC/B,MAAK,MAAM,KACT,sEACD;;CAIL,sBACE,oBAGM;AACN,QAAM,sBAAsB,mBAAmB;AAC/C,OAAK,yBAAyB;;CAGhC,0BAAgE;AAC9D,MAAI,KAAK,kBACP,QAAO,KAAK;EAGd,MAAM,EACJ,eACA,gBACA,WACA,cACA,kBACE,KAAK;AAET,MAAI,CAAC,iBAAiB,CAAC,eACrB;AAGF,OAAK,oBAAoB,IAAIC,mEAAAA,iBAAiB;GAC5C,SAAS;GACT,MAAM,KAAK;GACX;GACA;GACA;GACA,oBAAoB,KAAK;GACzB;GACD,CAAC;AAEF,SAAO,KAAK;;CAGd,cAA8B;AAC5B,SAAO,KAAK,mBAAmB,aAAa,IAAI;;CAKlD,OAAuB,SAAqC;AAC1D,OAAK,aAAa;AAClB,OAAK,gBAAgB,QAAQ;;CAG/B,WAAoC;AAClC,OAAK,iBAAiB;;CAGxB,gBAAwB,SAAqC;AAC3D,OAAK,aAAa;AAClB,OAAK,wBAAwB;AAC3B,QAAK,yBAAyB,EAAE,OAAO,QAAQ;IAC/C;;CAGJ,QAAqB;AACnB,OAAK,aAAa;AAClB,OAAK,mBAAmB,OAAO;;CAGjC,SAAsB;AACpB,MAAI,CAAC,KAAK,YAAY;AACpB,QAAK,OAAO,EAAE,OAAO,MAAM,CAAC;AAC5B;;AAEF,OAAK,wBAAwB;AAC3B,QAAK,mBAAmB,QAAQ;AAChC,QAAK,aAAa;IAClB;;CAGJ,kBAA0B,QAA0B;AAClD,MAAI,KAAK,cAAc;AAChB,QAAK,aAAa,KAAK,OAAO;AACnC;;AAEF,UAAQ;;CAGV,YAAqC;EACnC,MAAM,YAAY,KAAK;AACvB,MAAI,CAAC,UACH;AAGF,OAAK,eAAe,UAAU,MAAM,CAAC,cAAc;AACjD,OAAI,KAAK,sBAAsB,UAC7B,MAAK,oBAAoB,KAAA;AAE3B,QAAK,eAAe,KAAA;IACpB;;;CAIJ,MAAa,iBAAgC;AAC3C,QAAM,KAAK"}
|