@kubesense/kubesense-browser-rum-core 1.8.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/cjs/boot/preStartRum.d.ts +4 -3
- package/cjs/boot/preStartRum.js +229 -204
- package/cjs/boot/preStartRum.js.map +1 -1
- package/cjs/boot/rumPublicApi.d.ts +190 -51
- package/cjs/boot/rumPublicApi.js +267 -164
- package/cjs/boot/rumPublicApi.js.map +1 -1
- package/cjs/boot/startRum.d.ts +42 -31
- package/cjs/boot/startRum.js +157 -150
- package/cjs/boot/startRum.js.map +1 -1
- package/cjs/browser/cookieObservable.d.ts +1 -5
- package/cjs/browser/cookieObservable.js +30 -34
- package/cjs/browser/cookieObservable.js.map +1 -1
- package/cjs/browser/domMutationObservable.d.ts +3 -3
- package/cjs/browser/domMutationObservable.js +29 -53
- package/cjs/browser/domMutationObservable.js.map +1 -1
- package/cjs/browser/htmlDomUtils.d.ts +5 -0
- package/cjs/browser/htmlDomUtils.js +38 -28
- package/cjs/browser/htmlDomUtils.js.map +1 -1
- package/cjs/browser/locationChangeObservable.d.ts +1 -2
- package/cjs/browser/locationChangeObservable.js +44 -45
- package/cjs/browser/locationChangeObservable.js.map +1 -1
- package/cjs/browser/performanceObservable.d.ts +4 -4
- package/cjs/browser/performanceObservable.js +50 -114
- package/cjs/browser/performanceObservable.js.map +1 -1
- package/cjs/browser/performanceUtils.d.ts +13 -1
- package/cjs/browser/performanceUtils.js +63 -37
- package/cjs/browser/performanceUtils.js.map +1 -1
- package/cjs/browser/scroll.js +17 -28
- package/cjs/browser/scroll.js.map +1 -1
- package/cjs/browser/viewportObservable.d.ts +2 -3
- package/cjs/browser/viewportObservable.js +29 -31
- package/cjs/browser/viewportObservable.js.map +1 -1
- package/cjs/browser/windowOpenObservable.js +11 -7
- package/cjs/browser/windowOpenObservable.js.map +1 -1
- package/cjs/domain/action/actionCollection.d.ts +11 -12
- package/cjs/domain/action/actionCollection.js +82 -89
- package/cjs/domain/action/actionCollection.js.map +1 -1
- package/cjs/domain/action/actionNameConstants.js +10 -9
- package/cjs/domain/action/actionNameConstants.js.map +1 -1
- package/cjs/domain/action/clickChain.js +51 -54
- package/cjs/domain/action/clickChain.js.map +1 -1
- package/cjs/domain/action/computeFrustration.js +30 -62
- package/cjs/domain/action/computeFrustration.js.map +1 -1
- package/cjs/domain/action/frustrationIgnore.d.ts +9 -0
- package/cjs/domain/action/frustrationIgnore.js +32 -0
- package/cjs/domain/action/frustrationIgnore.js.map +1 -0
- package/cjs/domain/action/getActionNameFromElement.js +141 -217
- package/cjs/domain/action/getActionNameFromElement.js.map +1 -1
- package/cjs/domain/action/interactionSelectorCache.d.ts +1 -1
- package/cjs/domain/action/interactionSelectorCache.js +17 -18
- package/cjs/domain/action/interactionSelectorCache.js.map +1 -1
- package/cjs/domain/action/isActionChildEvent.d.ts +2 -0
- package/cjs/domain/action/isActionChildEvent.js +8 -0
- package/cjs/domain/action/isActionChildEvent.js.map +1 -0
- package/cjs/domain/action/listenActionEvents.d.ts +2 -3
- package/cjs/domain/action/listenActionEvents.js +51 -55
- package/cjs/domain/action/listenActionEvents.js.map +1 -1
- package/cjs/domain/action/trackClickActions.d.ts +15 -21
- package/cjs/domain/action/trackClickActions.js +188 -226
- package/cjs/domain/action/trackClickActions.js.map +1 -1
- package/cjs/domain/action/trackManualActions.d.ts +45 -0
- package/cjs/domain/action/trackManualActions.js +48 -0
- package/cjs/domain/action/trackManualActions.js.map +1 -0
- package/cjs/domain/assembly.d.ts +1 -2
- package/cjs/domain/assembly.js +80 -95
- package/cjs/domain/assembly.js.map +1 -1
- package/cjs/domain/configuration/configuration.d.ts +575 -81
- package/cjs/domain/configuration/configuration.js +464 -199
- package/cjs/domain/configuration/configuration.js.map +1 -1
- package/cjs/domain/configuration/index.d.ts +1 -0
- package/cjs/domain/configuration/index.js +27 -21
- package/cjs/domain/configuration/jsonPathParser.js +125 -139
- package/cjs/domain/configuration/jsonPathParser.js.map +1 -1
- package/cjs/domain/configuration/remoteConfiguration.d.ts +18 -5
- package/cjs/domain/configuration/remoteConfiguration.js +268 -226
- package/cjs/domain/configuration/remoteConfiguration.js.map +1 -1
- package/cjs/domain/configuration/remoteConfiguration.types.d.ts +49 -0
- package/cjs/domain/configuration/remoteConfigurationCache.d.ts +42 -0
- package/cjs/domain/configuration/remoteConfigurationCache.js +95 -0
- package/cjs/domain/configuration/remoteConfigurationCache.js.map +1 -0
- package/cjs/domain/configuration/remoteSdkConfiguration.d.ts +11 -2
- package/cjs/domain/configuration/remoteSdkConfiguration.js +185 -117
- package/cjs/domain/configuration/remoteSdkConfiguration.js.map +1 -1
- package/cjs/domain/configuration/sessionReplayRoutes.d.ts +1 -6
- package/cjs/domain/configuration/sessionReplayRoutes.js +20 -63
- package/cjs/domain/configuration/sessionReplayRoutes.js.map +1 -1
- package/cjs/domain/contexts/ciVisibilityContext.d.ts +2 -4
- package/cjs/domain/contexts/ciVisibilityContext.js +36 -32
- package/cjs/domain/contexts/ciVisibilityContext.js.map +1 -1
- package/cjs/domain/contexts/connectivityContext.d.ts +2 -2
- package/cjs/domain/contexts/connectivityContext.js +10 -9
- package/cjs/domain/contexts/connectivityContext.js.map +1 -1
- package/cjs/domain/contexts/defaultContext.d.ts +3 -3
- package/cjs/domain/contexts/defaultContext.js +28 -32
- package/cjs/domain/contexts/defaultContext.js.map +1 -1
- package/cjs/domain/contexts/displayContext.d.ts +2 -3
- package/cjs/domain/contexts/displayContext.js +22 -26
- package/cjs/domain/contexts/displayContext.js.map +1 -1
- package/cjs/domain/contexts/featureFlagContext.d.ts +2 -2
- package/cjs/domain/contexts/featureFlagContext.js +38 -50
- package/cjs/domain/contexts/featureFlagContext.js.map +1 -1
- package/cjs/domain/contexts/internalContext.d.ts +2 -3
- package/cjs/domain/contexts/internalContext.js +26 -22
- package/cjs/domain/contexts/internalContext.js.map +1 -1
- package/cjs/domain/contexts/pageStateHistory.d.ts +3 -4
- package/cjs/domain/contexts/pageStateHistory.js +76 -96
- package/cjs/domain/contexts/pageStateHistory.js.map +1 -1
- package/cjs/domain/contexts/sessionContext.d.ts +9 -3
- package/cjs/domain/contexts/sessionContext.js +31 -45
- package/cjs/domain/contexts/sessionContext.js.map +1 -1
- package/cjs/domain/contexts/sourceCodeMfeContext.d.ts +10 -0
- package/cjs/domain/contexts/sourceCodeMfeContext.js +35 -0
- package/cjs/domain/contexts/sourceCodeMfeContext.js.map +1 -0
- package/cjs/domain/contexts/syntheticsContext.d.ts +2 -2
- package/cjs/domain/contexts/syntheticsContext.js +19 -23
- package/cjs/domain/contexts/syntheticsContext.js.map +1 -1
- package/cjs/domain/contexts/trackingConsentContext.d.ts +2 -2
- package/cjs/domain/contexts/trackingConsentContext.js +10 -12
- package/cjs/domain/contexts/trackingConsentContext.js.map +1 -1
- package/cjs/domain/contexts/urlContexts.d.ts +4 -3
- package/cjs/domain/contexts/urlContexts.js +65 -61
- package/cjs/domain/contexts/urlContexts.js.map +1 -1
- package/cjs/domain/contexts/userAgentDataContext.d.ts +2 -2
- package/cjs/domain/contexts/userAgentDataContext.js +20 -29
- package/cjs/domain/contexts/userAgentDataContext.js.map +1 -1
- package/cjs/domain/contexts/viewHistory.d.ts +5 -2
- package/cjs/domain/contexts/viewHistory.js +41 -45
- package/cjs/domain/contexts/viewHistory.js.map +1 -1
- package/cjs/domain/discardNegativeDuration.d.ts +1 -1
- package/cjs/domain/discardNegativeDuration.js +6 -5
- package/cjs/domain/discardNegativeDuration.js.map +1 -1
- package/cjs/domain/error/errorCollection.d.ts +3 -3
- package/cjs/domain/error/errorCollection.js +67 -68
- package/cjs/domain/error/errorCollection.js.map +1 -1
- package/cjs/domain/error/trackReportError.d.ts +1 -2
- package/cjs/domain/error/trackReportError.js +10 -14
- package/cjs/domain/error/trackReportError.js.map +1 -1
- package/cjs/domain/event/eventCollection.d.ts +2 -1
- package/cjs/domain/event/eventCollection.js +21 -22
- package/cjs/domain/event/eventCollection.js.map +1 -1
- package/cjs/domain/eventTracker.d.ts +37 -0
- package/cjs/domain/eventTracker.js +94 -0
- package/cjs/domain/eventTracker.js.map +1 -0
- package/cjs/domain/extractRegexMatch.d.ts +5 -0
- package/cjs/domain/extractRegexMatch.js +16 -0
- package/cjs/domain/extractRegexMatch.js.map +1 -0
- package/cjs/domain/getComposedPathSelector.d.ts +22 -0
- package/cjs/domain/getComposedPathSelector.js +95 -0
- package/cjs/domain/getComposedPathSelector.js.map +1 -0
- package/cjs/domain/getSelectorFromElement.d.ts +18 -6
- package/cjs/domain/getSelectorFromElement.js +199 -191
- package/cjs/domain/getSelectorFromElement.js.map +1 -1
- package/cjs/domain/getSessionReplayUrl.d.ts +2 -2
- package/cjs/domain/getSessionReplayUrl.js +17 -30
- package/cjs/domain/getSessionReplayUrl.js.map +1 -1
- package/cjs/domain/hooks.d.ts +26 -17
- package/cjs/domain/hooks.js +12 -5
- package/cjs/domain/hooks.js.map +1 -1
- package/cjs/domain/lifeCycle.d.ts +26 -12
- package/cjs/domain/lifeCycle.js +28 -5
- package/cjs/domain/lifeCycle.js.map +1 -1
- package/cjs/domain/limitModification.d.ts +5 -1
- package/cjs/domain/limitModification.js +32 -36
- package/cjs/domain/limitModification.js.map +1 -1
- package/cjs/domain/longTask/longTaskCollection.d.ts +0 -13
- package/cjs/domain/longTask/longTaskCollection.js +75 -87
- package/cjs/domain/longTask/longTaskCollection.js.map +1 -1
- package/cjs/domain/plugins.d.ts +37 -14
- package/cjs/domain/plugins.js +22 -13
- package/cjs/domain/plugins.js.map +1 -1
- package/cjs/domain/privacy.d.ts +6 -1
- package/cjs/domain/privacy.js +143 -286
- package/cjs/domain/privacy.js.map +1 -1
- package/cjs/domain/privacyConstants.js +43 -34
- package/cjs/domain/privacyConstants.js.map +1 -1
- package/cjs/domain/requestCollection.d.ts +6 -5
- package/cjs/domain/requestCollection.js +82 -105
- package/cjs/domain/requestCollection.js.map +1 -1
- package/cjs/domain/resource/graphql.d.ts +1 -1
- package/cjs/domain/resource/graphql.js +85 -86
- package/cjs/domain/resource/graphql.js.map +1 -1
- package/cjs/domain/resource/requestRegistry.js +30 -38
- package/cjs/domain/resource/requestRegistry.js.map +1 -1
- package/cjs/domain/resource/resourceCollection.d.ts +5 -3
- package/cjs/domain/resource/resourceCollection.js +241 -175
- package/cjs/domain/resource/resourceCollection.js.map +1 -1
- package/cjs/domain/resource/resourceUtils.d.ts +13 -13
- package/cjs/domain/resource/resourceUtils.js +323 -221
- package/cjs/domain/resource/resourceUtils.js.map +1 -1
- package/cjs/domain/resource/trackManualResources.d.ts +55 -0
- package/cjs/domain/resource/trackManualResources.js +53 -0
- package/cjs/domain/resource/trackManualResources.js.map +1 -0
- package/cjs/domain/resource/webSocketCollection.d.ts +46 -0
- package/cjs/domain/resource/webSocketCollection.js +163 -0
- package/cjs/domain/resource/webSocketCollection.js.map +1 -0
- package/cjs/domain/session/session.types.d.ts +4 -0
- package/cjs/domain/sessionReplayState.d.ts +8 -0
- package/cjs/domain/sessionReplayState.js +19 -0
- package/cjs/domain/sessionReplayState.js.map +1 -0
- package/cjs/domain/startCustomerDataTelemetry.js +39 -43
- package/cjs/domain/startCustomerDataTelemetry.js.map +1 -1
- package/cjs/domain/tracing/getDocumentTraceId.d.ts +1 -1
- package/cjs/domain/tracing/getDocumentTraceId.js +42 -63
- package/cjs/domain/tracing/getDocumentTraceId.js.map +1 -1
- package/cjs/domain/tracing/identifier.js +13 -46
- package/cjs/domain/tracing/identifier.js.map +1 -1
- package/cjs/domain/tracing/tracer.d.ts +2 -5
- package/cjs/domain/tracing/tracer.js +110 -150
- package/cjs/domain/tracing/tracer.js.map +1 -1
- package/cjs/domain/trackEventCounts.js +43 -48
- package/cjs/domain/trackEventCounts.js.map +1 -1
- package/cjs/domain/view/bfCacheSupport.d.ts +1 -2
- package/cjs/domain/view/bfCacheSupport.js +10 -11
- package/cjs/domain/view/bfCacheSupport.js.map +1 -1
- package/cjs/domain/view/trackViewEventCounts.js +14 -13
- package/cjs/domain/view/trackViewEventCounts.js.map +1 -1
- package/cjs/domain/view/trackViews.d.ts +8 -2
- package/cjs/domain/view/trackViews.js +221 -270
- package/cjs/domain/view/trackViews.js.map +1 -1
- package/cjs/domain/view/viewCollection.d.ts +4 -3
- package/cjs/domain/view/viewCollection.js +124 -148
- package/cjs/domain/view/viewCollection.js.map +1 -1
- package/cjs/domain/view/viewDiff.d.ts +22 -0
- package/cjs/domain/view/viewDiff.js +62 -0
- package/cjs/domain/view/viewDiff.js.map +1 -0
- package/cjs/domain/view/viewMetrics/getClsAttributionImpactedArea.js +20 -22
- package/cjs/domain/view/viewMetrics/getClsAttributionImpactedArea.js.map +1 -1
- package/cjs/domain/view/viewMetrics/interactionCountPolyfill.d.ts +1 -0
- package/cjs/domain/view/viewMetrics/interactionCountPolyfill.js +35 -33
- package/cjs/domain/view/viewMetrics/interactionCountPolyfill.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackBfcacheMetrics.d.ts +1 -1
- package/cjs/domain/view/viewMetrics/trackBfcacheMetrics.js +14 -13
- package/cjs/domain/view/viewMetrics/trackBfcacheMetrics.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackCommonViewMetrics.d.ts +4 -2
- package/cjs/domain/view/viewMetrics/trackCommonViewMetrics.js +51 -34
- package/cjs/domain/view/viewMetrics/trackCommonViewMetrics.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackCumulativeLayoutShift.d.ts +1 -1
- package/cjs/domain/view/viewMetrics/trackCumulativeLayoutShift.js +106 -122
- package/cjs/domain/view/viewMetrics/trackCumulativeLayoutShift.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackFirstContentfulPaint.d.ts +2 -3
- package/cjs/domain/view/viewMetrics/trackFirstContentfulPaint.js +26 -34
- package/cjs/domain/view/viewMetrics/trackFirstContentfulPaint.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackFirstHidden.d.ts +2 -3
- package/cjs/domain/view/viewMetrics/trackFirstHidden.js +31 -31
- package/cjs/domain/view/viewMetrics/trackFirstHidden.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackInitialViewMetrics.d.ts +1 -3
- package/cjs/domain/view/viewMetrics/trackInitialViewMetrics.js +33 -38
- package/cjs/domain/view/viewMetrics/trackInitialViewMetrics.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackInteractionToNextPaint.d.ts +10 -1
- package/cjs/domain/view/viewMetrics/trackInteractionToNextPaint.js +202 -144
- package/cjs/domain/view/viewMetrics/trackInteractionToNextPaint.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackLargestContentfulPaint.d.ts +6 -1
- package/cjs/domain/view/viewMetrics/trackLargestContentfulPaint.js +65 -55
- package/cjs/domain/view/viewMetrics/trackLargestContentfulPaint.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackLoadingTime.d.ts +2 -1
- package/cjs/domain/view/viewMetrics/trackLoadingTime.js +42 -46
- package/cjs/domain/view/viewMetrics/trackLoadingTime.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackNavigationTimings.d.ts +2 -3
- package/cjs/domain/view/viewMetrics/trackNavigationTimings.js +28 -36
- package/cjs/domain/view/viewMetrics/trackNavigationTimings.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackScrollMetrics.d.ts +3 -4
- package/cjs/domain/view/viewMetrics/trackScrollMetrics.js +63 -72
- package/cjs/domain/view/viewMetrics/trackScrollMetrics.js.map +1 -1
- package/cjs/domain/vital/vitalCollection.d.ts +44 -20
- package/cjs/domain/vital/vitalCollection.js +81 -109
- package/cjs/domain/vital/vitalCollection.js.map +1 -1
- package/cjs/domain/waitPageActivityEnd.d.ts +1 -4
- package/cjs/domain/waitPageActivityEnd.js +99 -119
- package/cjs/domain/waitPageActivityEnd.js.map +1 -1
- package/cjs/domainContext.types.d.ts +21 -13
- package/cjs/index.d.ts +11 -10
- package/cjs/index.js +84 -62
- package/cjs/rawRumEvent.types.d.ts +79 -13
- package/cjs/rawRumEvent.types.js +40 -27
- package/cjs/rawRumEvent.types.js.map +1 -1
- package/cjs/rumEvent.types.d.ts +906 -669
- package/cjs/transport/formDataTransport.js +43 -41
- package/cjs/transport/formDataTransport.js.map +1 -1
- package/cjs/transport/startRumBatch.d.ts +27 -3
- package/cjs/transport/startRumBatch.js +132 -31
- package/cjs/transport/startRumBatch.js.map +1 -1
- package/cjs/transport/startRumEventBridge.js +10 -8
- package/cjs/transport/startRumEventBridge.js.map +1 -1
- package/esm/boot/preStartRum.mjs +233 -0
- package/esm/boot/preStartRum.mjs.map +1 -0
- package/esm/boot/rumPublicApi.mjs +271 -0
- package/esm/boot/rumPublicApi.mjs.map +1 -0
- package/esm/boot/startRum.mjs +159 -0
- package/esm/boot/startRum.mjs.map +1 -0
- package/esm/browser/cookieObservable.mjs +34 -0
- package/esm/browser/cookieObservable.mjs.map +1 -0
- package/esm/browser/domMutationObservable.mjs +33 -0
- package/esm/browser/domMutationObservable.mjs.map +1 -0
- package/esm/browser/htmlDomUtils.mjs +48 -0
- package/esm/browser/htmlDomUtils.mjs.map +1 -0
- package/esm/browser/locationChangeObservable.mjs +50 -0
- package/esm/browser/locationChangeObservable.mjs.map +1 -0
- package/esm/browser/performanceObservable.mjs +60 -0
- package/esm/browser/performanceObservable.mjs.map +1 -0
- package/esm/browser/performanceUtils.mjs +64 -0
- package/esm/browser/performanceUtils.mjs.map +1 -0
- package/esm/browser/scroll.mjs +21 -0
- package/esm/browser/scroll.mjs.map +1 -0
- package/esm/browser/viewportObservable.mjs +33 -0
- package/esm/browser/viewportObservable.mjs.map +1 -0
- package/esm/browser/windowOpenObservable.mjs +14 -0
- package/esm/browser/windowOpenObservable.mjs.map +1 -0
- package/esm/domain/action/actionCollection.mjs +89 -0
- package/esm/domain/action/actionCollection.mjs.map +1 -0
- package/esm/domain/action/actionNameConstants.mjs +11 -0
- package/esm/domain/action/actionNameConstants.mjs.map +1 -0
- package/esm/domain/action/clickChain.mjs +57 -0
- package/esm/domain/action/clickChain.mjs.map +1 -0
- package/esm/domain/action/computeFrustration.mjs +36 -0
- package/esm/domain/action/computeFrustration.mjs.map +1 -0
- package/esm/domain/action/frustrationIgnore.mjs +31 -0
- package/esm/domain/action/frustrationIgnore.mjs.map +1 -0
- package/esm/domain/action/getActionNameFromElement.mjs +163 -0
- package/esm/domain/action/getActionNameFromElement.mjs.map +1 -0
- package/esm/domain/action/interactionSelectorCache.mjs +19 -0
- package/esm/domain/action/interactionSelectorCache.mjs.map +1 -0
- package/esm/domain/action/isActionChildEvent.mjs +8 -0
- package/esm/domain/action/isActionChildEvent.mjs.map +1 -0
- package/esm/domain/action/listenActionEvents.mjs +57 -0
- package/esm/domain/action/listenActionEvents.mjs.map +1 -0
- package/esm/domain/action/trackClickActions.mjs +198 -0
- package/esm/domain/action/trackClickActions.mjs.map +1 -0
- package/esm/domain/action/trackManualActions.mjs +48 -0
- package/esm/domain/action/trackManualActions.mjs.map +1 -0
- package/esm/domain/assembly.mjs +87 -0
- package/esm/domain/assembly.mjs.map +1 -0
- package/esm/domain/configuration/configuration.mjs +474 -0
- package/esm/domain/configuration/configuration.mjs.map +1 -0
- package/esm/domain/configuration/index.mjs +6 -0
- package/esm/domain/configuration/jsonPathParser.mjs +145 -0
- package/esm/domain/configuration/jsonPathParser.mjs.map +1 -0
- package/esm/domain/configuration/remoteConfiguration.mjs +279 -0
- package/esm/domain/configuration/remoteConfiguration.mjs.map +1 -0
- package/esm/domain/configuration/remoteConfigurationCache.mjs +92 -0
- package/esm/domain/configuration/remoteConfigurationCache.mjs.map +1 -0
- package/esm/domain/configuration/remoteSdkConfiguration.mjs +208 -0
- package/esm/domain/configuration/remoteSdkConfiguration.mjs.map +1 -0
- package/esm/domain/configuration/sessionReplayRoutes.mjs +26 -0
- package/esm/domain/configuration/sessionReplayRoutes.mjs.map +1 -0
- package/esm/domain/contexts/ciVisibilityContext.mjs +37 -0
- package/esm/domain/contexts/ciVisibilityContext.mjs.map +1 -0
- package/esm/domain/contexts/connectivityContext.mjs +12 -0
- package/esm/domain/contexts/connectivityContext.mjs.map +1 -0
- package/esm/domain/contexts/defaultContext.mjs +30 -0
- package/esm/domain/contexts/defaultContext.mjs.map +1 -0
- package/esm/domain/contexts/displayContext.mjs +24 -0
- package/esm/domain/contexts/displayContext.mjs.map +1 -0
- package/esm/domain/contexts/featureFlagContext.mjs +40 -0
- package/esm/domain/contexts/featureFlagContext.mjs.map +1 -0
- package/esm/domain/contexts/internalContext.mjs +30 -0
- package/esm/domain/contexts/internalContext.mjs.map +1 -0
- package/esm/domain/contexts/pageStateHistory.mjs +82 -0
- package/esm/domain/contexts/pageStateHistory.mjs.map +1 -0
- package/esm/domain/contexts/sessionContext.mjs +33 -0
- package/esm/domain/contexts/sessionContext.mjs.map +1 -0
- package/esm/domain/contexts/sourceCodeMfeContext.mjs +35 -0
- package/esm/domain/contexts/sourceCodeMfeContext.mjs.map +1 -0
- package/esm/domain/contexts/syntheticsContext.mjs +21 -0
- package/esm/domain/contexts/syntheticsContext.mjs.map +1 -0
- package/esm/domain/contexts/trackingConsentContext.mjs +12 -0
- package/esm/domain/contexts/trackingConsentContext.mjs.map +1 -0
- package/esm/domain/contexts/urlContexts.mjs +67 -0
- package/esm/domain/contexts/urlContexts.mjs.map +1 -0
- package/esm/domain/contexts/userAgentDataContext.mjs +22 -0
- package/esm/domain/contexts/userAgentDataContext.mjs.map +1 -0
- package/esm/domain/contexts/viewHistory.mjs +43 -0
- package/esm/domain/contexts/viewHistory.mjs.map +1 -0
- package/esm/domain/discardNegativeDuration.mjs +9 -0
- package/esm/domain/discardNegativeDuration.mjs.map +1 -0
- package/esm/domain/error/errorCollection.mjs +72 -0
- package/esm/domain/error/errorCollection.mjs.map +1 -0
- package/esm/domain/error/trackReportError.mjs +12 -0
- package/esm/domain/error/trackReportError.mjs.map +1 -0
- package/esm/domain/event/eventCollection.mjs +26 -0
- package/esm/domain/event/eventCollection.mjs.map +1 -0
- package/esm/domain/eventTracker.mjs +93 -0
- package/esm/domain/eventTracker.mjs.map +1 -0
- package/esm/domain/extractRegexMatch.mjs +16 -0
- package/esm/domain/extractRegexMatch.mjs.map +1 -0
- package/esm/domain/getComposedPathSelector.mjs +93 -0
- package/esm/domain/getComposedPathSelector.mjs.map +1 -0
- package/esm/domain/getSelectorFromElement.mjs +218 -0
- package/esm/domain/getSelectorFromElement.mjs.map +1 -0
- package/esm/domain/getSessionReplayUrl.mjs +20 -0
- package/esm/domain/getSessionReplayUrl.mjs.map +1 -0
- package/esm/domain/hooks.mjs +13 -0
- package/esm/domain/hooks.mjs.map +1 -0
- package/esm/domain/lifeCycle.mjs +28 -0
- package/esm/domain/lifeCycle.mjs.map +1 -0
- package/esm/domain/limitModification.mjs +42 -0
- package/esm/domain/limitModification.mjs.map +1 -0
- package/esm/domain/longTask/longTaskCollection.mjs +79 -0
- package/esm/domain/longTask/longTaskCollection.mjs.map +1 -0
- package/esm/domain/plugins.mjs +23 -0
- package/esm/domain/plugins.mjs.map +1 -0
- package/esm/domain/privacy.mjs +161 -0
- package/esm/domain/privacy.mjs.map +1 -0
- package/esm/domain/privacyConstants.mjs +36 -0
- package/esm/domain/privacyConstants.mjs.map +1 -0
- package/esm/domain/requestCollection.mjs +86 -0
- package/esm/domain/requestCollection.mjs.map +1 -0
- package/esm/domain/resource/graphql.mjs +93 -0
- package/esm/domain/resource/graphql.mjs.map +1 -0
- package/esm/domain/resource/requestRegistry.mjs +32 -0
- package/esm/domain/resource/requestRegistry.mjs.map +1 -0
- package/esm/domain/resource/resourceCollection.mjs +256 -0
- package/esm/domain/resource/resourceCollection.mjs.map +1 -0
- package/esm/domain/resource/resourceUtils.mjs +349 -0
- package/esm/domain/resource/resourceUtils.mjs.map +1 -0
- package/esm/domain/resource/trackManualResources.mjs +53 -0
- package/esm/domain/resource/trackManualResources.mjs.map +1 -0
- package/esm/domain/resource/webSocketCollection.mjs +160 -0
- package/esm/domain/resource/webSocketCollection.mjs.map +1 -0
- package/esm/domain/sessionReplayState.mjs +18 -0
- package/esm/domain/sessionReplayState.mjs.map +1 -0
- package/esm/domain/startCustomerDataTelemetry.mjs +51 -0
- package/esm/domain/startCustomerDataTelemetry.mjs.map +1 -0
- package/esm/domain/tracing/getDocumentTraceId.mjs +50 -0
- package/esm/domain/tracing/getDocumentTraceId.mjs.map +1 -0
- package/esm/domain/tracing/identifier.mjs +20 -0
- package/esm/domain/tracing/identifier.mjs.map +1 -0
- package/esm/domain/tracing/tracer.mjs +120 -0
- package/esm/domain/tracing/tracer.mjs.map +1 -0
- package/esm/domain/trackEventCounts.mjs +45 -0
- package/esm/domain/trackEventCounts.mjs.map +1 -0
- package/esm/domain/view/bfCacheSupport.mjs +12 -0
- package/esm/domain/view/bfCacheSupport.mjs.map +1 -0
- package/esm/domain/view/trackViewEventCounts.mjs +17 -0
- package/esm/domain/view/trackViewEventCounts.mjs.map +1 -0
- package/esm/domain/view/trackViews.mjs +230 -0
- package/esm/domain/view/trackViews.mjs.map +1 -0
- package/esm/domain/view/viewCollection.mjs +129 -0
- package/esm/domain/view/viewCollection.mjs.map +1 -0
- package/esm/domain/view/viewDiff.mjs +61 -0
- package/esm/domain/view/viewDiff.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.mjs +30 -0
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.mjs +45 -0
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.mjs +18 -0
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.mjs +54 -0
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.mjs +117 -0
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.mjs +29 -0
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackFirstHidden.mjs +33 -0
- package/esm/domain/view/viewMetrics/trackFirstHidden.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.mjs +36 -0
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.mjs +210 -0
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.mjs +70 -0
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackLoadingTime.mjs +46 -0
- package/esm/domain/view/viewMetrics/trackLoadingTime.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackNavigationTimings.mjs +35 -0
- package/esm/domain/view/viewMetrics/trackNavigationTimings.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackScrollMetrics.mjs +66 -0
- package/esm/domain/view/viewMetrics/trackScrollMetrics.mjs.map +1 -0
- package/esm/domain/vital/vitalCollection.mjs +85 -0
- package/esm/domain/vital/vitalCollection.mjs.map +1 -0
- package/esm/domain/waitPageActivityEnd.mjs +107 -0
- package/esm/domain/waitPageActivityEnd.mjs.map +1 -0
- package/esm/index.mjs +23 -0
- package/esm/rawRumEvent.types.mjs +42 -0
- package/esm/rawRumEvent.types.mjs.map +1 -0
- package/esm/transport/formDataTransport.mjs +48 -0
- package/esm/transport/formDataTransport.mjs.map +1 -0
- package/esm/transport/startRumBatch.mjs +132 -0
- package/esm/transport/startRumBatch.mjs.map +1 -0
- package/esm/transport/startRumEventBridge.mjs +13 -0
- package/esm/transport/startRumEventBridge.mjs.map +1 -0
- package/package.json +19 -11
- package/src/boot/preStartRum.ts +216 -88
- package/src/boot/rumPublicApi.ts +358 -119
- package/src/boot/startRum.ts +88 -84
- package/src/browser/cookieObservable.ts +19 -28
- package/src/browser/domMutationObservable.ts +7 -12
- package/src/browser/htmlDomUtils.ts +15 -0
- package/src/browser/locationChangeObservable.ts +23 -12
- package/src/browser/performanceObservable.ts +23 -73
- package/src/browser/performanceUtils.ts +52 -4
- package/src/browser/viewportObservable.ts +4 -6
- package/src/domain/action/actionCollection.ts +94 -87
- package/src/domain/action/clickChain.ts +11 -10
- package/src/domain/action/computeFrustration.ts +19 -5
- package/src/domain/action/frustrationIgnore.ts +54 -0
- package/src/domain/action/getActionNameFromElement.ts +27 -61
- package/src/domain/action/interactionSelectorCache.ts +2 -2
- package/src/domain/action/isActionChildEvent.ts +6 -0
- package/src/domain/action/listenActionEvents.ts +2 -11
- package/src/domain/action/trackClickActions.ts +92 -82
- package/src/domain/action/trackManualActions.ts +104 -0
- package/src/domain/assembly.ts +57 -70
- package/src/domain/configuration/configuration.ts +587 -208
- package/src/domain/configuration/index.ts +1 -0
- package/src/domain/configuration/remoteConfiguration.ts +152 -29
- package/src/domain/configuration/remoteConfiguration.types.ts +51 -1
- package/src/domain/configuration/remoteConfigurationCache.ts +153 -0
- package/src/domain/configuration/remoteSdkConfiguration.ts +131 -13
- package/src/domain/configuration/sessionReplayRoutes.ts +2 -47
- package/src/domain/contexts/ciVisibilityContext.ts +23 -12
- package/src/domain/contexts/connectivityContext.ts +7 -10
- package/src/domain/contexts/defaultContext.ts +11 -14
- package/src/domain/contexts/displayContext.ts +8 -12
- package/src/domain/contexts/featureFlagContext.ts +5 -4
- package/src/domain/contexts/internalContext.ts +3 -3
- package/src/domain/contexts/pageStateHistory.ts +20 -31
- package/src/domain/contexts/sessionContext.ts +16 -22
- package/src/domain/contexts/sourceCodeMfeContext.ts +53 -0
- package/src/domain/contexts/syntheticsContext.ts +7 -17
- package/src/domain/contexts/trackingConsentContext.ts +7 -4
- package/src/domain/contexts/urlContexts.ts +13 -9
- package/src/domain/contexts/userAgentDataContext.ts +12 -13
- package/src/domain/contexts/viewHistory.ts +4 -3
- package/src/domain/discardNegativeDuration.ts +1 -1
- package/src/domain/error/errorCollection.ts +12 -22
- package/src/domain/error/trackReportError.ts +4 -7
- package/src/domain/event/eventCollection.ts +4 -2
- package/src/domain/eventTracker.ts +169 -0
- package/src/domain/extractRegexMatch.ts +15 -0
- package/src/domain/getComposedPathSelector.ts +130 -0
- package/src/domain/getSelectorFromElement.ts +125 -31
- package/src/domain/getSessionReplayUrl.ts +4 -13
- package/src/domain/hooks.ts +34 -21
- package/src/domain/lifeCycle.ts +21 -8
- package/src/domain/limitModification.ts +20 -4
- package/src/domain/longTask/longTaskCollection.ts +18 -47
- package/src/domain/plugins.ts +54 -25
- package/src/domain/privacy.ts +16 -24
- package/src/domain/requestCollection.ts +108 -97
- package/src/domain/resource/graphql.ts +71 -25
- package/src/domain/resource/requestRegistry.ts +1 -3
- package/src/domain/resource/resourceCollection.ts +319 -137
- package/src/domain/resource/resourceUtils.ts +24 -26
- package/src/domain/resource/trackManualResources.ts +121 -0
- package/src/domain/resource/webSocketCollection.ts +281 -0
- package/src/domain/session/session.types.ts +5 -0
- package/src/domain/sessionReplayState.ts +36 -0
- package/src/domain/startCustomerDataTelemetry.ts +2 -2
- package/src/domain/tracing/getDocumentTraceId.ts +5 -4
- package/src/domain/tracing/identifier.ts +6 -37
- package/src/domain/tracing/tracer.ts +22 -21
- package/src/domain/tracing/tracer.types.ts +3 -3
- package/src/domain/view/bfCacheSupport.ts +1 -6
- package/src/domain/view/trackViews.ts +40 -37
- package/src/domain/view/viewCollection.ts +29 -23
- package/src/domain/view/viewDiff.ts +115 -0
- package/src/domain/view/viewMetrics/interactionCountPolyfill.ts +13 -2
- package/src/domain/view/viewMetrics/trackBfcacheMetrics.ts +1 -1
- package/src/domain/view/viewMetrics/trackCommonViewMetrics.ts +27 -6
- package/src/domain/view/viewMetrics/trackCumulativeLayoutShift.ts +5 -3
- package/src/domain/view/viewMetrics/trackFirstContentfulPaint.ts +4 -9
- package/src/domain/view/viewMetrics/trackFirstHidden.ts +2 -8
- package/src/domain/view/viewMetrics/trackInitialViewMetrics.ts +4 -13
- package/src/domain/view/viewMetrics/trackInteractionToNextPaint.ts +180 -35
- package/src/domain/view/viewMetrics/trackLargestContentfulPaint.ts +47 -6
- package/src/domain/view/viewMetrics/trackLoadingTime.ts +4 -3
- package/src/domain/view/viewMetrics/trackNavigationTimings.ts +10 -18
- package/src/domain/view/viewMetrics/trackScrollMetrics.ts +23 -37
- package/src/domain/vital/vitalCollection.ts +83 -102
- package/src/domain/waitPageActivityEnd.ts +7 -11
- package/src/domainContext.types.ts +23 -15
- package/src/index.ts +17 -11
- package/src/rawRumEvent.types.ts +80 -26
- package/src/rumEvent.types.ts +730 -505
- package/src/transport/formDataTransport.ts +16 -6
- package/src/transport/startRumBatch.ts +181 -24
- package/cjs/browser/firstInputPolyfill.d.ts +0 -8
- package/cjs/browser/firstInputPolyfill.js +0 -68
- package/cjs/browser/firstInputPolyfill.js.map +0 -1
- package/cjs/domain/configuration/index.js.map +0 -1
- package/cjs/domain/configuration/remoteConfiguration.types.js +0 -7
- package/cjs/domain/configuration/remoteConfiguration.types.js.map +0 -1
- package/cjs/domain/error/trackConsoleError.d.ts +0 -4
- package/cjs/domain/error/trackConsoleError.js +0 -13
- package/cjs/domain/error/trackConsoleError.js.map +0 -1
- package/cjs/domain/resource/matchRequestResourceEntry.d.ts +0 -16
- package/cjs/domain/resource/matchRequestResourceEntry.js +0 -49
- package/cjs/domain/resource/matchRequestResourceEntry.js.map +0 -1
- package/cjs/domain/resource/retrieveInitialDocumentResourceTiming.d.ts +0 -4
- package/cjs/domain/resource/retrieveInitialDocumentResourceTiming.js +0 -24
- package/cjs/domain/resource/retrieveInitialDocumentResourceTiming.js.map +0 -1
- package/cjs/domain/rumSessionManager.d.ts +0 -36
- package/cjs/domain/rumSessionManager.js +0 -77
- package/cjs/domain/rumSessionManager.js.map +0 -1
- package/cjs/domain/sampler/sampler.d.ts +0 -10
- package/cjs/domain/sampler/sampler.js +0 -63
- package/cjs/domain/sampler/sampler.js.map +0 -1
- package/cjs/domain/tracing/sampler.d.ts +0 -10
- package/cjs/domain/tracing/sampler.js +0 -69
- package/cjs/domain/tracing/sampler.js.map +0 -1
- package/cjs/domain/tracing/tracer.types.js +0 -3
- package/cjs/domain/tracing/tracer.types.js.map +0 -1
- package/cjs/domain/view/viewMetrics/startInitialViewMetricsTelemetry.d.ts +0 -6
- package/cjs/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js +0 -44
- package/cjs/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js.map +0 -1
- package/cjs/domain/view/viewMetrics/trackFirstInput.d.ts +0 -19
- package/cjs/domain/view/viewMetrics/trackFirstInput.js +0 -43
- package/cjs/domain/view/viewMetrics/trackFirstInput.js.map +0 -1
- package/cjs/domainContext.types.js +0 -6
- package/cjs/domainContext.types.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/rumEvent.types.js +0 -7
- package/cjs/rumEvent.types.js.map +0 -1
- package/esm/boot/preStartRum.d.ts +0 -7
- package/esm/boot/preStartRum.js +0 -205
- package/esm/boot/preStartRum.js.map +0 -1
- package/esm/boot/rumPublicApi.d.ts +0 -409
- package/esm/boot/rumPublicApi.js +0 -165
- package/esm/boot/rumPublicApi.js.map +0 -1
- package/esm/boot/startRum.d.ts +0 -109
- package/esm/boot/startRum.js +0 -149
- package/esm/boot/startRum.js.map +0 -1
- package/esm/browser/cookieObservable.d.ts +0 -8
- package/esm/browser/cookieObservable.js +0 -35
- package/esm/browser/cookieObservable.js.map +0 -1
- package/esm/browser/domMutationObservable.d.ts +0 -27
- package/esm/browser/domMutationObservable.js +0 -54
- package/esm/browser/domMutationObservable.js.map +0 -1
- package/esm/browser/firstInputPolyfill.d.ts +0 -8
- package/esm/browser/firstInputPolyfill.js +0 -65
- package/esm/browser/firstInputPolyfill.js.map +0 -1
- package/esm/browser/htmlDomUtils.d.ts +0 -13
- package/esm/browser/htmlDomUtils.js +0 -36
- package/esm/browser/htmlDomUtils.js.map +0 -1
- package/esm/browser/locationChangeObservable.d.ts +0 -7
- package/esm/browser/locationChangeObservable.js +0 -48
- package/esm/browser/locationChangeObservable.js.map +0 -1
- package/esm/browser/performanceObservable.d.ts +0 -174
- package/esm/browser/performanceObservable.js +0 -121
- package/esm/browser/performanceObservable.js.map +0 -1
- package/esm/browser/performanceUtils.d.ts +0 -7
- package/esm/browser/performanceUtils.js +0 -38
- package/esm/browser/performanceUtils.js.map +0 -1
- package/esm/browser/scroll.d.ts +0 -2
- package/esm/browser/scroll.js +0 -29
- package/esm/browser/scroll.js.map +0 -1
- package/esm/browser/viewportObservable.d.ts +0 -10
- package/esm/browser/viewportObservable.js +0 -32
- package/esm/browser/viewportObservable.js.map +0 -1
- package/esm/browser/windowOpenObservable.d.ts +0 -5
- package/esm/browser/windowOpenObservable.js +0 -7
- package/esm/browser/windowOpenObservable.js.map +0 -1
- package/esm/domain/action/actionCollection.d.ts +0 -21
- package/esm/domain/action/actionCollection.js +0 -93
- package/esm/domain/action/actionCollection.js.map +0 -1
- package/esm/domain/action/actionNameConstants.d.ts +0 -18
- package/esm/domain/action/actionNameConstants.js +0 -8
- package/esm/domain/action/actionNameConstants.js.map +0 -1
- package/esm/domain/action/clickChain.d.ts +0 -8
- package/esm/domain/action/clickChain.js +0 -57
- package/esm/domain/action/clickChain.js.map +0 -1
- package/esm/domain/action/computeFrustration.d.ts +0 -6
- package/esm/domain/action/computeFrustration.js +0 -65
- package/esm/domain/action/computeFrustration.js.map +0 -1
- package/esm/domain/action/getActionNameFromElement.d.ts +0 -4
- package/esm/domain/action/getActionNameFromElement.js +0 -236
- package/esm/domain/action/getActionNameFromElement.js.map +0 -1
- package/esm/domain/action/interactionSelectorCache.d.ts +0 -5
- package/esm/domain/action/interactionSelectorCache.js +0 -18
- package/esm/domain/action/interactionSelectorCache.js.map +0 -1
- package/esm/domain/action/listenActionEvents.d.ts +0 -19
- package/esm/domain/action/listenActionEvents.js +0 -58
- package/esm/domain/action/listenActionEvents.js.map +0 -1
- package/esm/domain/action/trackClickActions.d.ts +0 -81
- package/esm/domain/action/trackClickActions.js +0 -232
- package/esm/domain/action/trackClickActions.js.map +0 -1
- package/esm/domain/assembly.d.ts +0 -5
- package/esm/domain/assembly.js +0 -99
- package/esm/domain/assembly.js.map +0 -1
- package/esm/domain/configuration/configuration.d.ts +0 -358
- package/esm/domain/configuration/configuration.js +0 -209
- package/esm/domain/configuration/configuration.js.map +0 -1
- package/esm/domain/configuration/index.d.ts +0 -4
- package/esm/domain/configuration/index.js +0 -5
- package/esm/domain/configuration/index.js.map +0 -1
- package/esm/domain/configuration/jsonPathParser.d.ts +0 -28
- package/esm/domain/configuration/jsonPathParser.js +0 -156
- package/esm/domain/configuration/jsonPathParser.js.map +0 -1
- package/esm/domain/configuration/remoteConfiguration.d.ts +0 -39
- package/esm/domain/configuration/remoteConfiguration.js +0 -236
- package/esm/domain/configuration/remoteConfiguration.js.map +0 -1
- package/esm/domain/configuration/remoteConfiguration.types.d.ts +0 -138
- package/esm/domain/configuration/remoteConfiguration.types.js +0 -6
- package/esm/domain/configuration/remoteConfiguration.types.js.map +0 -1
- package/esm/domain/configuration/remoteSdkConfiguration.d.ts +0 -18
- package/esm/domain/configuration/remoteSdkConfiguration.js +0 -137
- package/esm/domain/configuration/remoteSdkConfiguration.js.map +0 -1
- package/esm/domain/configuration/sessionReplayRoutes.d.ts +0 -35
- package/esm/domain/configuration/sessionReplayRoutes.js +0 -65
- package/esm/domain/configuration/sessionReplayRoutes.js.map +0 -1
- package/esm/domain/contexts/ciVisibilityContext.d.ts +0 -12
- package/esm/domain/contexts/ciVisibilityContext.js +0 -30
- package/esm/domain/contexts/ciVisibilityContext.js.map +0 -1
- package/esm/domain/contexts/connectivityContext.d.ts +0 -2
- package/esm/domain/contexts/connectivityContext.js +0 -8
- package/esm/domain/contexts/connectivityContext.js.map +0 -1
- package/esm/domain/contexts/defaultContext.d.ts +0 -4
- package/esm/domain/contexts/defaultContext.js +0 -31
- package/esm/domain/contexts/defaultContext.js.map +0 -1
- package/esm/domain/contexts/displayContext.d.ts +0 -6
- package/esm/domain/contexts/displayContext.js +0 -25
- package/esm/domain/contexts/displayContext.js.map +0 -1
- package/esm/domain/contexts/featureFlagContext.d.ts +0 -19
- package/esm/domain/contexts/featureFlagContext.js +0 -49
- package/esm/domain/contexts/featureFlagContext.js.map +0 -1
- package/esm/domain/contexts/internalContext.d.ts +0 -12
- package/esm/domain/contexts/internalContext.js +0 -23
- package/esm/domain/contexts/internalContext.js.map +0 -1
- package/esm/domain/contexts/pageStateHistory.d.ts +0 -23
- package/esm/domain/contexts/pageStateHistory.js +0 -100
- package/esm/domain/contexts/pageStateHistory.js.map +0 -1
- package/esm/domain/contexts/sessionContext.d.ts +0 -5
- package/esm/domain/contexts/sessionContext.js +0 -44
- package/esm/domain/contexts/sessionContext.js.map +0 -1
- package/esm/domain/contexts/syntheticsContext.d.ts +0 -2
- package/esm/domain/contexts/syntheticsContext.js +0 -22
- package/esm/domain/contexts/syntheticsContext.js.map +0 -1
- package/esm/domain/contexts/trackingConsentContext.d.ts +0 -3
- package/esm/domain/contexts/trackingConsentContext.js +0 -11
- package/esm/domain/contexts/trackingConsentContext.js.map +0 -1
- package/esm/domain/contexts/urlContexts.d.ts +0 -22
- package/esm/domain/contexts/urlContexts.js +0 -60
- package/esm/domain/contexts/urlContexts.js.map +0 -1
- package/esm/domain/contexts/userAgentDataContext.d.ts +0 -2
- package/esm/domain/contexts/userAgentDataContext.js +0 -28
- package/esm/domain/contexts/userAgentDataContext.js.map +0 -1
- package/esm/domain/contexts/viewHistory.d.ts +0 -17
- package/esm/domain/contexts/viewHistory.js +0 -44
- package/esm/domain/contexts/viewHistory.js.map +0 -1
- package/esm/domain/discardNegativeDuration.d.ts +0 -2
- package/esm/domain/discardNegativeDuration.js +0 -5
- package/esm/domain/discardNegativeDuration.js.map +0 -1
- package/esm/domain/error/errorCollection.d.ts +0 -17
- package/esm/domain/error/errorCollection.js +0 -70
- package/esm/domain/error/errorCollection.js.map +0 -1
- package/esm/domain/error/trackConsoleError.d.ts +0 -4
- package/esm/domain/error/trackConsoleError.js +0 -10
- package/esm/domain/error/trackConsoleError.js.map +0 -1
- package/esm/domain/error/trackReportError.d.ts +0 -5
- package/esm/domain/error/trackReportError.js +0 -13
- package/esm/domain/error/trackReportError.js.map +0 -1
- package/esm/domain/event/eventCollection.d.ts +0 -10
- package/esm/domain/event/eventCollection.js +0 -24
- package/esm/domain/event/eventCollection.js.map +0 -1
- package/esm/domain/getSelectorFromElement.d.ts +0 -64
- package/esm/domain/getSelectorFromElement.js +0 -213
- package/esm/domain/getSelectorFromElement.js.map +0 -1
- package/esm/domain/getSessionReplayUrl.d.ts +0 -9
- package/esm/domain/getSessionReplayUrl.js +0 -30
- package/esm/domain/getSessionReplayUrl.js.map +0 -1
- package/esm/domain/hooks.d.ts +0 -23
- package/esm/domain/hooks.js +0 -3
- package/esm/domain/hooks.js.map +0 -1
- package/esm/domain/lifeCycle.d.ts +0 -73
- package/esm/domain/lifeCycle.js +0 -3
- package/esm/domain/lifeCycle.js.map +0 -1
- package/esm/domain/limitModification.d.ts +0 -8
- package/esm/domain/limitModification.js +0 -43
- package/esm/domain/limitModification.js.map +0 -1
- package/esm/domain/longTask/longTaskCollection.d.ts +0 -18
- package/esm/domain/longTask/longTaskCollection.js +0 -87
- package/esm/domain/longTask/longTaskCollection.js.map +0 -1
- package/esm/domain/plugins.d.ts +0 -40
- package/esm/domain/plugins.js +0 -12
- package/esm/domain/plugins.js.map +0 -1
- package/esm/domain/privacy.d.ts +0 -44
- package/esm/domain/privacy.js +0 -302
- package/esm/domain/privacy.js.map +0 -1
- package/esm/domain/privacyConstants.d.ts +0 -23
- package/esm/domain/privacyConstants.js +0 -35
- package/esm/domain/privacyConstants.js.map +0 -1
- package/esm/domain/requestCollection.d.ts +0 -54
- package/esm/domain/requestCollection.js +0 -106
- package/esm/domain/requestCollection.js.map +0 -1
- package/esm/domain/resource/graphql.d.ts +0 -23
- package/esm/domain/resource/graphql.js +0 -91
- package/esm/domain/resource/graphql.js.map +0 -1
- package/esm/domain/resource/matchRequestResourceEntry.d.ts +0 -16
- package/esm/domain/resource/matchRequestResourceEntry.js +0 -46
- package/esm/domain/resource/matchRequestResourceEntry.js.map +0 -1
- package/esm/domain/resource/requestRegistry.d.ts +0 -9
- package/esm/domain/resource/requestRegistry.js +0 -37
- package/esm/domain/resource/requestRegistry.js.map +0 -1
- package/esm/domain/resource/resourceCollection.d.ts +0 -7
- package/esm/domain/resource/resourceCollection.js +0 -187
- package/esm/domain/resource/resourceCollection.js.map +0 -1
- package/esm/domain/resource/resourceUtils.d.ts +0 -55
- package/esm/domain/resource/resourceUtils.js +0 -244
- package/esm/domain/resource/resourceUtils.js.map +0 -1
- package/esm/domain/resource/retrieveInitialDocumentResourceTiming.d.ts +0 -4
- package/esm/domain/resource/retrieveInitialDocumentResourceTiming.js +0 -21
- package/esm/domain/resource/retrieveInitialDocumentResourceTiming.js.map +0 -1
- package/esm/domain/rumSessionManager.d.ts +0 -36
- package/esm/domain/rumSessionManager.js +0 -72
- package/esm/domain/rumSessionManager.js.map +0 -1
- package/esm/domain/sampler/sampler.d.ts +0 -10
- package/esm/domain/sampler/sampler.js +0 -58
- package/esm/domain/sampler/sampler.js.map +0 -1
- package/esm/domain/startCustomerDataTelemetry.d.ts +0 -4
- package/esm/domain/startCustomerDataTelemetry.js +0 -52
- package/esm/domain/startCustomerDataTelemetry.js.map +0 -1
- package/esm/domain/tracing/getDocumentTraceId.d.ts +0 -12
- package/esm/domain/tracing/getDocumentTraceId.js +0 -68
- package/esm/domain/tracing/getDocumentTraceId.js.map +0 -1
- package/esm/domain/tracing/identifier.d.ts +0 -13
- package/esm/domain/tracing/identifier.js +0 -50
- package/esm/domain/tracing/identifier.js.map +0 -1
- package/esm/domain/tracing/sampler.d.ts +0 -10
- package/esm/domain/tracing/sampler.js +0 -64
- package/esm/domain/tracing/sampler.js.map +0 -1
- package/esm/domain/tracing/tracer.d.ts +0 -30
- package/esm/domain/tracing/tracer.js +0 -156
- package/esm/domain/tracing/tracer.js.map +0 -1
- package/esm/domain/tracing/tracer.types.d.ts +0 -12
- package/esm/domain/tracing/tracer.types.js +0 -2
- package/esm/domain/tracing/tracer.types.js.map +0 -1
- package/esm/domain/trackEventCounts.d.ts +0 -17
- package/esm/domain/trackEventCounts.js +0 -47
- package/esm/domain/trackEventCounts.js.map +0 -1
- package/esm/domain/view/bfCacheSupport.d.ts +0 -2
- package/esm/domain/view/bfCacheSupport.js +0 -10
- package/esm/domain/view/bfCacheSupport.js.map +0 -1
- package/esm/domain/view/trackViewEventCounts.d.ts +0 -5
- package/esm/domain/view/trackViewEventCounts.js +0 -13
- package/esm/domain/view/trackViewEventCounts.js.map +0 -1
- package/esm/domain/view/trackViews.d.ts +0 -65
- package/esm/domain/view/trackViews.js +0 -278
- package/esm/domain/view/trackViews.js.map +0 -1
- package/esm/domain/view/viewCollection.d.ts +0 -18
- package/esm/domain/view/viewCollection.js +0 -150
- package/esm/domain/view/viewCollection.js.map +0 -1
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.d.ts +0 -6
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.js +0 -28
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.js.map +0 -1
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.d.ts +0 -18
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.js +0 -39
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.js.map +0 -1
- package/esm/domain/view/viewMetrics/startInitialViewMetricsTelemetry.d.ts +0 -6
- package/esm/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js +0 -41
- package/esm/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.d.ts +0 -8
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.js +0 -14
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.d.ts +0 -21
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.js +0 -34
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.d.ts +0 -37
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.js +0 -130
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.d.ts +0 -13
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.js +0 -34
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackFirstHidden.d.ts +0 -10
- package/esm/domain/view/viewMetrics/trackFirstHidden.js +0 -30
- package/esm/domain/view/viewMetrics/trackFirstHidden.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackFirstInput.d.ts +0 -19
- package/esm/domain/view/viewMetrics/trackFirstInput.js +0 -40
- package/esm/domain/view/viewMetrics/trackFirstInput.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.d.ts +0 -15
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.js +0 -38
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.d.ts +0 -25
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.js +0 -149
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.d.ts +0 -18
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.js +0 -57
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackLoadingTime.d.ts +0 -14
- package/esm/domain/view/viewMetrics/trackLoadingTime.js +0 -47
- package/esm/domain/view/viewMetrics/trackLoadingTime.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackNavigationTimings.d.ts +0 -14
- package/esm/domain/view/viewMetrics/trackNavigationTimings.js +0 -40
- package/esm/domain/view/viewMetrics/trackNavigationTimings.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackScrollMetrics.d.ts +0 -25
- package/esm/domain/view/viewMetrics/trackScrollMetrics.js +0 -72
- package/esm/domain/view/viewMetrics/trackScrollMetrics.js.map +0 -1
- package/esm/domain/vital/vitalCollection.d.ts +0 -55
- package/esm/domain/vital/vitalCollection.js +0 -107
- package/esm/domain/vital/vitalCollection.js.map +0 -1
- package/esm/domain/waitPageActivityEnd.d.ts +0 -54
- package/esm/domain/waitPageActivityEnd.js +0 -123
- package/esm/domain/waitPageActivityEnd.js.map +0 -1
- package/esm/domainContext.types.d.ts +0 -39
- package/esm/domainContext.types.js +0 -5
- package/esm/domainContext.types.js.map +0 -1
- package/esm/index.d.ts +0 -42
- package/esm/index.js +0 -22
- package/esm/index.js.map +0 -1
- package/esm/rawRumEvent.types.d.ts +0 -326
- package/esm/rawRumEvent.types.js +0 -31
- package/esm/rawRumEvent.types.js.map +0 -1
- package/esm/rumEvent.types.d.ts +0 -2038
- package/esm/rumEvent.types.js +0 -6
- package/esm/rumEvent.types.js.map +0 -1
- package/esm/transport/formDataTransport.d.ts +0 -16
- package/esm/transport/formDataTransport.js +0 -43
- package/esm/transport/formDataTransport.js.map +0 -1
- package/esm/transport/startRumBatch.d.ts +0 -5
- package/esm/transport/startRumBatch.js +0 -30
- package/esm/transport/startRumBatch.js.map +0 -1
- package/esm/transport/startRumEventBridge.d.ts +0 -2
- package/esm/transport/startRumEventBridge.js +0 -8
- package/esm/transport/startRumEventBridge.js.map +0 -1
- package/src/browser/firstInputPolyfill.ts +0 -87
- package/src/domain/error/trackConsoleError.ts +0 -14
- package/src/domain/resource/matchRequestResourceEntry.ts +0 -68
- package/src/domain/resource/retrieveInitialDocumentResourceTiming.ts +0 -27
- package/src/domain/rumSessionManager.ts +0 -134
- package/src/domain/sampler/sampler.ts +0 -63
- package/src/domain/tracing/sampler.ts +0 -69
- package/src/domain/view/viewMetrics/startInitialViewMetricsTelemetry.ts +0 -70
- package/src/domain/view/viewMetrics/trackFirstInput.ts +0 -59
|
@@ -3,10 +3,18 @@ import type {
|
|
|
3
3
|
Encoder,
|
|
4
4
|
EncoderResult,
|
|
5
5
|
DeflateEncoderStreamId,
|
|
6
|
-
RawError,
|
|
7
6
|
Context,
|
|
8
7
|
} from '@kubesense/kubesense-browser-core'
|
|
9
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
addTelemetryDebug,
|
|
10
|
+
createHttpRequest,
|
|
11
|
+
jsonStringify,
|
|
12
|
+
objectEntries,
|
|
13
|
+
ErrorSource,
|
|
14
|
+
DEFAULT_ERROR_TYPE,
|
|
15
|
+
} from '@kubesense/kubesense-browser-core'
|
|
16
|
+
import { clocksNow } from '@kubesense/kubesense-js-core/time'
|
|
17
|
+
import { createEndpointBuilder } from '@kubesense/kubesense-js-core/transport'
|
|
10
18
|
import type { RumConfiguration } from '../domain/configuration'
|
|
11
19
|
import type { LifeCycle } from '../domain/lifeCycle'
|
|
12
20
|
import { LifeCycleEventType } from '../domain/lifeCycle'
|
|
@@ -29,14 +37,16 @@ export function createFormDataTransport<T extends TransportPayload>(
|
|
|
29
37
|
createEncoder: (streamId: DeflateEncoderStreamId) => Encoder,
|
|
30
38
|
streamId: DeflateEncoderStreamId
|
|
31
39
|
) {
|
|
32
|
-
const reportError = (
|
|
33
|
-
lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED, {
|
|
40
|
+
const reportError = (message: string) => {
|
|
41
|
+
lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED, {
|
|
42
|
+
error: { message, type: DEFAULT_ERROR_TYPE, source: ErrorSource.AGENT, startClocks: clocksNow() },
|
|
43
|
+
})
|
|
34
44
|
|
|
35
45
|
// monitor-until: forever, to keep an eye on the errors reported to customers
|
|
36
|
-
addTelemetryDebug('Error reported to customer', { 'error.message':
|
|
46
|
+
addTelemetryDebug('Error reported to customer', { 'error.message': message })
|
|
37
47
|
}
|
|
38
48
|
|
|
39
|
-
const httpRequest = createHttpRequest([configuration
|
|
49
|
+
const httpRequest = createHttpRequest([createEndpointBuilder(configuration, 'profile')], reportError)
|
|
40
50
|
|
|
41
51
|
const encoder = createEncoder(streamId)
|
|
42
52
|
|
|
@@ -1,46 +1,203 @@
|
|
|
1
|
-
import type { Observable,
|
|
2
|
-
import { createBatch,
|
|
1
|
+
import type { Observable, Encoder, Context } from '@kubesense/kubesense-browser-core'
|
|
2
|
+
import { createBatch, DeflateEncoderStreamId, sendToExtension } from '@kubesense/kubesense-browser-core'
|
|
3
|
+
import { combine } from '@kubesense/kubesense-js-core/util'
|
|
4
|
+
import { createEndpointBuilder, createReplicaEndpointBuilder } from '@kubesense/kubesense-js-core/transport'
|
|
3
5
|
import type { RumConfiguration } from '../domain/configuration'
|
|
4
6
|
import type { LifeCycle } from '../domain/lifeCycle'
|
|
5
7
|
import { LifeCycleEventType } from '../domain/lifeCycle'
|
|
6
8
|
import type { AssembledRumEvent } from '../rawRumEvent.types'
|
|
9
|
+
import type { RumViewEvent, RumViewUpdateEvent } from '../rumEvent.types'
|
|
7
10
|
import { RumEventType } from '../rawRumEvent.types'
|
|
11
|
+
import { diffMerge } from '../domain/view/viewDiff'
|
|
12
|
+
|
|
13
|
+
export const PARTIAL_VIEW_UPDATE_CHECKPOINT_INTERVAL = 100
|
|
14
|
+
|
|
15
|
+
export type AssembledViewDiff = Omit<RumViewUpdateEvent, 'view' | '_kubesense'> & {
|
|
16
|
+
view: Partial<RumViewEvent['view']> & { id: string; url: string }
|
|
17
|
+
_kubesense?: { document_version: number; format_version: number; [k: string]: unknown }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function computeAssembledViewDiff(current: RumViewEvent, last: RumViewEvent): AssembledViewDiff | undefined {
|
|
21
|
+
const diff = diffMerge(current, last, {
|
|
22
|
+
// context, connectivity, usr, device, privacy are objects — use REPLACE to avoid partial updates
|
|
23
|
+
replaceKeys: new Set(['view.custom_timings', 'context', 'connectivity', 'usr', 'device', 'privacy']),
|
|
24
|
+
appendKeys: new Set(['_kubesense.page_states']),
|
|
25
|
+
// Ignore always-required fields — they are added back via combine regardless of changes
|
|
26
|
+
ignoreKeys: new Set([
|
|
27
|
+
'date',
|
|
28
|
+
'type',
|
|
29
|
+
'application',
|
|
30
|
+
'session',
|
|
31
|
+
'view.id',
|
|
32
|
+
'view.url',
|
|
33
|
+
'_kubesense.document_version',
|
|
34
|
+
'_kubesense.format_version',
|
|
35
|
+
]),
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
if (!diff) {
|
|
39
|
+
return undefined
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Merge always-required fields on top of the diff for backend routing
|
|
43
|
+
return combine(diff, {
|
|
44
|
+
type: RumEventType.VIEW_UPDATE,
|
|
45
|
+
date: current.date,
|
|
46
|
+
application: current.application,
|
|
47
|
+
session: current.session,
|
|
48
|
+
view: {
|
|
49
|
+
id: current.view.id,
|
|
50
|
+
url: current.view.url,
|
|
51
|
+
},
|
|
52
|
+
_kubesense: {
|
|
53
|
+
document_version: current._kubesense.document_version,
|
|
54
|
+
format_version: current._kubesense.format_version,
|
|
55
|
+
},
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Dispatches assembled RUM events to the batch. VIEW events are handled specially:
|
|
61
|
+
* intermediate updates either replace the full VIEW already in the batch, or are
|
|
62
|
+
* aggregated into a single view_update diff against the last flushed state.
|
|
63
|
+
*/
|
|
64
|
+
export function createBatchDispatcher(
|
|
65
|
+
batch: Pick<ReturnType<typeof createBatch>, 'flushObservable' | 'isEmpty' | 'add' | 'upsert'>,
|
|
66
|
+
enableViewUpdates: boolean
|
|
67
|
+
): { dispatch: (event: AssembledRumEvent) => void; stop: () => void } {
|
|
68
|
+
let lastSentView: RumViewEvent | undefined
|
|
69
|
+
// Base used to compute the aggregate diff for the current batch's view_update.
|
|
70
|
+
// Reset to lastSentView on each flush (= what the backend received in the previous batch).
|
|
71
|
+
let batchBase: RumViewEvent | undefined
|
|
72
|
+
// True when the current batch already contains a full VIEW event for the active view.
|
|
73
|
+
// Reset to false on each flush.
|
|
74
|
+
let batchHasFullView = false
|
|
75
|
+
let viewUpdatesSinceCheckpoint = 0
|
|
76
|
+
|
|
77
|
+
// On flush: advance batchBase to lastSentView (what the backend now has) and clear the flag.
|
|
78
|
+
// lastSentView is set AFTER batch.upsert() in the new-view and checkpoint paths so that if
|
|
79
|
+
// upsert() triggers a sync flush, the subscriber captures the previous view (what the backend
|
|
80
|
+
// actually received), not the one being added.
|
|
81
|
+
const { unsubscribe } = batch.flushObservable.subscribe(() => {
|
|
82
|
+
batchHasFullView = false
|
|
83
|
+
batchBase = lastSentView
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
dispatch: (serverRumEvent: AssembledRumEvent) => {
|
|
88
|
+
if (serverRumEvent.type !== RumEventType.VIEW) {
|
|
89
|
+
// Non-view events: always append
|
|
90
|
+
batch.add(serverRumEvent)
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (!enableViewUpdates) {
|
|
95
|
+
// Feature OFF: existing behavior — upsert full view
|
|
96
|
+
batch.upsert(serverRumEvent, serverRumEvent.view.id)
|
|
97
|
+
return
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const viewId = serverRumEvent.view.id
|
|
101
|
+
|
|
102
|
+
// View ended (is_active: false) — always send a full VIEW.
|
|
103
|
+
// Checked before the new-view guard so that a stale view-end for an old view
|
|
104
|
+
// (arriving after a new view has already started) is handled correctly: we upsert
|
|
105
|
+
// it without touching the state of the current view.
|
|
106
|
+
if (!serverRumEvent.view.is_active) {
|
|
107
|
+
if (viewId === lastSentView?.view.id) {
|
|
108
|
+
// Current view ended — reset all state
|
|
109
|
+
lastSentView = undefined
|
|
110
|
+
batchBase = undefined
|
|
111
|
+
batchHasFullView = false
|
|
112
|
+
viewUpdatesSinceCheckpoint = 0
|
|
113
|
+
}
|
|
114
|
+
batch.upsert(serverRumEvent, viewId)
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// New view started
|
|
119
|
+
if (viewId !== lastSentView?.view.id) {
|
|
120
|
+
viewUpdatesSinceCheckpoint = 0
|
|
121
|
+
batch.upsert(serverRumEvent, viewId)
|
|
122
|
+
// lastSentView set AFTER upsert: if upsert triggers a sync flush, the subscriber
|
|
123
|
+
// captures the old lastSentView as batchBase (what the backend actually received),
|
|
124
|
+
// not the new view that hasn't been sent yet.
|
|
125
|
+
lastSentView = serverRumEvent
|
|
126
|
+
// If upsert triggered an after-add flush (e.g. messages_limit), the VIEW was sent
|
|
127
|
+
// and the batch is now empty — isEmpty is true. Otherwise the VIEW is in the batch.
|
|
128
|
+
batchHasFullView = !batch.isEmpty
|
|
129
|
+
return
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Intermediate update
|
|
133
|
+
lastSentView = serverRumEvent
|
|
134
|
+
|
|
135
|
+
if (batchHasFullView) {
|
|
136
|
+
// Optimization 1: batch already has a full VIEW — replace it with the latest full view.
|
|
137
|
+
// This is equivalent to the non-experimental upsert behavior for in-flight batches.
|
|
138
|
+
batch.upsert(serverRumEvent, viewId)
|
|
139
|
+
return
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Optimization 2: no full VIEW in the current batch — compute an aggregate diff from
|
|
143
|
+
// batchBase (last state the backend received) and upsert it under the same key as the VIEW.
|
|
144
|
+
// Each update replaces the previous aggregate, so the batch always contains at most one
|
|
145
|
+
// view_update per view ID.
|
|
146
|
+
//
|
|
147
|
+
// Note: view_update events are created here, post-assembly, bypassing
|
|
148
|
+
// RAW_RUM_EVENT_COLLECTED → assembly → RUM_EVENT_COLLECTED. They intentionally skip
|
|
149
|
+
// beforeSend — view_update is an internal bandwidth optimization, not a customer-visible type.
|
|
150
|
+
|
|
151
|
+
// Checkpoint: periodically send a full VIEW for backend reliability.
|
|
152
|
+
// When the checkpoint fires, upsert(VIEW) replaces any pending view_update (same key).
|
|
153
|
+
viewUpdatesSinceCheckpoint += 1
|
|
154
|
+
if (viewUpdatesSinceCheckpoint >= PARTIAL_VIEW_UPDATE_CHECKPOINT_INTERVAL) {
|
|
155
|
+
viewUpdatesSinceCheckpoint = 0
|
|
156
|
+
batch.upsert(serverRumEvent, viewId)
|
|
157
|
+
batchHasFullView = !batch.isEmpty
|
|
158
|
+
return
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (batchBase) {
|
|
162
|
+
const diff = computeAssembledViewDiff(serverRumEvent, batchBase)
|
|
163
|
+
if (diff) {
|
|
164
|
+
sendToExtension('rum', diff)
|
|
165
|
+
batch.upsert(diff as unknown as Context, viewId)
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
stop: unsubscribe,
|
|
170
|
+
}
|
|
171
|
+
}
|
|
8
172
|
|
|
9
173
|
export function startRumBatch(
|
|
10
174
|
configuration: RumConfiguration,
|
|
11
175
|
lifeCycle: LifeCycle,
|
|
12
|
-
reportError: (
|
|
13
|
-
pageMayExitObservable: Observable<PageMayExitEvent>,
|
|
176
|
+
reportError: (message: string) => void,
|
|
14
177
|
sessionExpireObservable: Observable<void>,
|
|
15
178
|
createEncoder: (streamId: DeflateEncoderStreamId) => Encoder
|
|
16
179
|
) {
|
|
17
|
-
const endpoints = [configuration
|
|
18
|
-
|
|
19
|
-
|
|
180
|
+
const endpoints = [createEndpointBuilder(configuration, 'rum')]
|
|
181
|
+
const replicaEndpoint = createReplicaEndpointBuilder(configuration, 'rum')
|
|
182
|
+
if (replicaEndpoint) {
|
|
183
|
+
endpoints.push(replicaEndpoint)
|
|
20
184
|
}
|
|
21
185
|
|
|
22
|
-
const request = createHttpRequest(endpoints, reportError)
|
|
23
|
-
|
|
24
186
|
const batch = createBatch({
|
|
25
187
|
encoder: createEncoder(DeflateEncoderStreamId.RUM),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
pageMayExitObservable,
|
|
29
|
-
sessionExpireObservable,
|
|
30
|
-
}),
|
|
188
|
+
endpoints,
|
|
189
|
+
reportError,
|
|
31
190
|
})
|
|
191
|
+
sessionExpireObservable.subscribe(() => batch.forceFlush('session_expire'))
|
|
32
192
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})
|
|
193
|
+
const { dispatch, stop: stopDispatcher } = createBatchDispatcher(batch, configuration.betaEnableViewUpdates)
|
|
194
|
+
lifeCycle.subscribe(LifeCycleEventType.RUM_EVENT_COLLECTED, dispatch)
|
|
36
195
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
})
|
|
196
|
+
const stopBatch = batch.stop.bind(batch)
|
|
197
|
+
batch.stop = () => {
|
|
198
|
+
stopDispatcher()
|
|
199
|
+
stopBatch()
|
|
200
|
+
}
|
|
44
201
|
|
|
45
202
|
return batch
|
|
46
203
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RumConfiguration } from '../domain/configuration';
|
|
2
|
-
/**
|
|
3
|
-
* first-input timing entry polyfill based on
|
|
4
|
-
* https://github.com/GoogleChrome/web-vitals/blob/master/src/lib/polyfills/firstInputPolyfill.ts
|
|
5
|
-
*/
|
|
6
|
-
export declare function retrieveFirstInputTiming(configuration: RumConfiguration, callback: (timing: PerformanceEventTiming) => void): {
|
|
7
|
-
stop: () => void;
|
|
8
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.retrieveFirstInputTiming = retrieveFirstInputTiming;
|
|
4
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
5
|
-
/**
|
|
6
|
-
* first-input timing entry polyfill based on
|
|
7
|
-
* https://github.com/GoogleChrome/web-vitals/blob/master/src/lib/polyfills/firstInputPolyfill.ts
|
|
8
|
-
*/
|
|
9
|
-
function retrieveFirstInputTiming(configuration, callback) {
|
|
10
|
-
const startTimeStamp = (0, kubesense_browser_core_1.dateNow)();
|
|
11
|
-
let timingSent = false;
|
|
12
|
-
const { stop: removeEventListeners } = (0, kubesense_browser_core_1.addEventListeners)(configuration, window, ["click" /* DOM_EVENT.CLICK */, "mousedown" /* DOM_EVENT.MOUSE_DOWN */, "keydown" /* DOM_EVENT.KEY_DOWN */, "touchstart" /* DOM_EVENT.TOUCH_START */, "pointerdown" /* DOM_EVENT.POINTER_DOWN */], (evt) => {
|
|
13
|
-
// Only count cancelable events, which should trigger behavior important to the user.
|
|
14
|
-
if (!evt.cancelable) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
// This timing will be used to compute the "first Input delay", which is the delta between
|
|
18
|
-
// when the system received the event (e.g. evt.timeStamp) and when it could run the callback
|
|
19
|
-
// (e.g. performance.now()).
|
|
20
|
-
const timing = {
|
|
21
|
-
entryType: 'first-input',
|
|
22
|
-
processingStart: (0, kubesense_browser_core_1.relativeNow)(),
|
|
23
|
-
processingEnd: (0, kubesense_browser_core_1.relativeNow)(),
|
|
24
|
-
startTime: evt.timeStamp,
|
|
25
|
-
duration: 0, // arbitrary value to avoid nullable duration and simplify INP logic
|
|
26
|
-
name: '',
|
|
27
|
-
cancelable: false,
|
|
28
|
-
target: null,
|
|
29
|
-
toJSON: () => ({}),
|
|
30
|
-
};
|
|
31
|
-
if (evt.type === "pointerdown" /* DOM_EVENT.POINTER_DOWN */) {
|
|
32
|
-
sendTimingIfPointerIsNotCancelled(configuration, timing);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
sendTiming(timing);
|
|
36
|
-
}
|
|
37
|
-
}, { passive: true, capture: true });
|
|
38
|
-
return { stop: removeEventListeners };
|
|
39
|
-
/**
|
|
40
|
-
* Pointer events are a special case, because they can trigger main or compositor thread behavior.
|
|
41
|
-
* We differentiate these cases based on whether or not we see a pointercancel event, which are
|
|
42
|
-
* fired when we scroll. If we're scrolling we don't need to report input delay since FID excludes
|
|
43
|
-
* scrolling and pinch/zooming.
|
|
44
|
-
*/
|
|
45
|
-
function sendTimingIfPointerIsNotCancelled(configuration, timing) {
|
|
46
|
-
(0, kubesense_browser_core_1.addEventListeners)(configuration, window, ["pointerup" /* DOM_EVENT.POINTER_UP */, "pointercancel" /* DOM_EVENT.POINTER_CANCEL */], (event) => {
|
|
47
|
-
if (event.type === "pointerup" /* DOM_EVENT.POINTER_UP */) {
|
|
48
|
-
sendTiming(timing);
|
|
49
|
-
}
|
|
50
|
-
}, { once: true });
|
|
51
|
-
}
|
|
52
|
-
function sendTiming(timing) {
|
|
53
|
-
if (!timingSent) {
|
|
54
|
-
timingSent = true;
|
|
55
|
-
removeEventListeners();
|
|
56
|
-
// In some cases the recorded delay is clearly wrong, e.g. it's negative or it's larger than
|
|
57
|
-
// the time between now and when the page was loaded.
|
|
58
|
-
// - https://github.com/GoogleChromeLabs/first-input-delay/issues/4
|
|
59
|
-
// - https://github.com/GoogleChromeLabs/first-input-delay/issues/6
|
|
60
|
-
// - https://github.com/GoogleChromeLabs/first-input-delay/issues/7
|
|
61
|
-
const delay = timing.processingStart - timing.startTime;
|
|
62
|
-
if (delay >= 0 && delay < (0, kubesense_browser_core_1.dateNow)() - startTimeStamp) {
|
|
63
|
-
callback(timing);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=firstInputPolyfill.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firstInputPolyfill.js","sourceRoot":"","sources":["../../src/browser/firstInputPolyfill.ts"],"names":[],"mappings":";;AAQA,4DA8EC;AArFD,8EAAsG;AAGtG;;;GAGG;AACH,SAAgB,wBAAwB,CACtC,aAA+B,EAC/B,QAAkD;IAElD,MAAM,cAAc,GAAG,IAAA,gCAAO,GAAE,CAAA;IAChC,IAAI,UAAU,GAAG,KAAK,CAAA;IAEtB,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,IAAA,0CAAiB,EACtD,aAAa,EACb,MAAM,EACN,iMAA0G,EAC1G,CAAC,GAAG,EAAE,EAAE;QACN,qFAAqF;QACrF,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;YACpB,OAAM;QACR,CAAC;QAED,0FAA0F;QAC1F,6FAA6F;QAC7F,4BAA4B;QAC5B,MAAM,MAAM,GAA2B;YACrC,SAAS,EAAE,aAAa;YACxB,eAAe,EAAE,IAAA,oCAAW,GAAE;YAC9B,aAAa,EAAE,IAAA,oCAAW,GAAE;YAC5B,SAAS,EAAE,GAAG,CAAC,SAAyB;YACxC,QAAQ,EAAE,CAAa,EAAE,oEAAoE;YAC7F,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;SACnB,CAAA;QAED,IAAI,GAAG,CAAC,IAAI,+CAA2B,EAAE,CAAC;YACxC,iCAAiC,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QAC1D,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,MAAM,CAAC,CAAA;QACpB,CAAC;IACH,CAAC,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CACjC,CAAA;IAED,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAErC;;;;;OAKG;IACH,SAAS,iCAAiC,CAAC,aAA+B,EAAE,MAA8B;QACxG,IAAA,0CAAiB,EACf,aAAa,EACb,MAAM,EACN,wFAAgD,EAChD,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,KAAK,CAAC,IAAI,2CAAyB,EAAE,CAAC;gBACxC,UAAU,CAAC,MAAM,CAAC,CAAA;YACpB,CAAC;QACH,CAAC,EACD,EAAE,IAAI,EAAE,IAAI,EAAE,CACf,CAAA;IACH,CAAC;IAED,SAAS,UAAU,CAAC,MAA8B;QAChD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,UAAU,GAAG,IAAI,CAAA;YACjB,oBAAoB,EAAE,CAAA;YACtB,4FAA4F;YAC5F,qDAAqD;YACrD,mEAAmE;YACnE,mEAAmE;YACnE,mEAAmE;YACnE,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,SAAS,CAAA;YACvD,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,IAAA,gCAAO,GAAE,GAAG,cAAc,EAAE,CAAC;gBACrD,QAAQ,CAAC,MAAM,CAAC,CAAA;YAClB,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/configuration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,wDAAqC;AACrC,2DAAwC;AACxC,wDAAqC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remoteConfiguration.types.js","sourceRoot":"","sources":["../../../src/domain/configuration/remoteConfiguration.types.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB;;GAEG"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.trackConsoleError = trackConsoleError;
|
|
4
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
5
|
-
function trackConsoleError(errorObservable) {
|
|
6
|
-
const subscription = (0, kubesense_browser_core_1.initConsoleObservable)([kubesense_browser_core_1.ConsoleApiName.error]).subscribe((consoleLog) => errorObservable.notify(consoleLog.error));
|
|
7
|
-
return {
|
|
8
|
-
stop: () => {
|
|
9
|
-
subscription.unsubscribe();
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=trackConsoleError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trackConsoleError.js","sourceRoot":"","sources":["../../../src/domain/error/trackConsoleError.ts"],"names":[],"mappings":";;AAGA,8CAUC;AAZD,8EAAyF;AAEzF,SAAgB,iBAAiB,CAAC,eAAqC;IACrE,MAAM,YAAY,GAAG,IAAA,8CAAqB,EAAC,CAAC,uCAAc,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,EAAE,CAC1F,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CACzC,CAAA;IAED,OAAO;QACL,IAAI,EAAE,GAAG,EAAE;YACT,YAAY,CAAC,WAAW,EAAE,CAAA;QAC5B,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RumPerformanceResourceTiming } from '../../browser/performanceObservable';
|
|
2
|
-
import type { RequestCompleteEvent } from '../requestCollection';
|
|
3
|
-
/**
|
|
4
|
-
* Look for corresponding timing in resource timing buffer
|
|
5
|
-
*
|
|
6
|
-
* Observations:
|
|
7
|
-
* - Timing (start, end) are nested inside the request (start, end)
|
|
8
|
-
* - Some timing can be not exactly nested, being off by < 1 ms
|
|
9
|
-
*
|
|
10
|
-
* Strategy:
|
|
11
|
-
* - from valid nested entries (with 1 ms error margin)
|
|
12
|
-
* - filter out timing that were already matched to a request
|
|
13
|
-
* - then, if a single timing match, return the timing
|
|
14
|
-
* - otherwise we can't decide, return undefined
|
|
15
|
-
*/
|
|
16
|
-
export declare function matchRequestResourceEntry(request: RequestCompleteEvent): RumPerformanceResourceTiming | undefined;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.matchRequestResourceEntry = matchRequestResourceEntry;
|
|
4
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
5
|
-
const resourceUtils_1 = require("./resourceUtils");
|
|
6
|
-
const alreadyMatchedEntries = new WeakSet();
|
|
7
|
-
/**
|
|
8
|
-
* Look for corresponding timing in resource timing buffer
|
|
9
|
-
*
|
|
10
|
-
* Observations:
|
|
11
|
-
* - Timing (start, end) are nested inside the request (start, end)
|
|
12
|
-
* - Some timing can be not exactly nested, being off by < 1 ms
|
|
13
|
-
*
|
|
14
|
-
* Strategy:
|
|
15
|
-
* - from valid nested entries (with 1 ms error margin)
|
|
16
|
-
* - filter out timing that were already matched to a request
|
|
17
|
-
* - then, if a single timing match, return the timing
|
|
18
|
-
* - otherwise we can't decide, return undefined
|
|
19
|
-
*/
|
|
20
|
-
function matchRequestResourceEntry(request) {
|
|
21
|
-
if (!performance || !('getEntriesByName' in performance)) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const sameNameEntries = performance.getEntriesByName(request.url, 'resource');
|
|
25
|
-
if (!sameNameEntries.length || !('toJSON' in sameNameEntries[0])) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const candidates = sameNameEntries
|
|
29
|
-
.filter((entry) => !alreadyMatchedEntries.has(entry))
|
|
30
|
-
// Only require valid duration — needed for the isBetween time-window check.
|
|
31
|
-
// hasValidResourceEntryTimings is intentionally NOT used here: cached resources often have
|
|
32
|
-
// timing fields zeroed out (browser behaviour) even though their duration and start time
|
|
33
|
-
// are correct and the entry should still be matched to its request.
|
|
34
|
-
.filter((entry) => (0, resourceUtils_1.hasValidResourceEntryDuration)(entry))
|
|
35
|
-
.filter((entry) => isBetween(entry, request.startClocks.relative, endTime({ startTime: request.startClocks.relative, duration: request.duration })));
|
|
36
|
-
if (candidates.length === 1) {
|
|
37
|
-
alreadyMatchedEntries.add(candidates[0]);
|
|
38
|
-
return candidates[0].toJSON();
|
|
39
|
-
}
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
function endTime(timing) {
|
|
43
|
-
return (0, kubesense_browser_core_1.addDuration)(timing.startTime, timing.duration);
|
|
44
|
-
}
|
|
45
|
-
function isBetween(timing, start, end) {
|
|
46
|
-
const errorMargin = 1;
|
|
47
|
-
return timing.startTime >= start - errorMargin && endTime(timing) <= (0, kubesense_browser_core_1.addDuration)(end, errorMargin);
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=matchRequestResourceEntry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"matchRequestResourceEntry.js","sourceRoot":"","sources":["../../../src/domain/resource/matchRequestResourceEntry.ts"],"names":[],"mappings":";;AA0BA,8DAgCC;AAzDD,8EAA+D;AAG/D,mDAA+D;AAO/D,MAAM,qBAAqB,GAAG,IAAI,OAAO,EAAoB,CAAA;AAE7D;;;;;;;;;;;;GAYG;AACH,SAAgB,yBAAyB,CAAC,OAA6B;IACrE,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,kBAAkB,IAAI,WAAW,CAAC,EAAE,CAAC;QACzD,OAAM;IACR,CAAC;IACD,MAAM,eAAe,GAAG,WAAW,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAmC,CAAA;IAE/G,IAAI,CAAC,eAAe,CAAC,MAAM,IAAI,CAAC,CAAC,QAAQ,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,OAAM;IACR,CAAC;IAED,MAAM,UAAU,GAAG,eAAe;SAC/B,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrD,4EAA4E;QAC5E,2FAA2F;QAC3F,yFAAyF;QACzF,oEAAoE;SACnE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,6CAA6B,EAAC,KAAK,CAAC,CAAC;SACvD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAChB,SAAS,CACP,KAAK,EACL,OAAO,CAAC,WAAW,CAAC,QAAQ,EAC5B,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CACjF,CACF,CAAA;IAEH,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,qBAAqB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;QAExC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,EAAkC,CAAA;IAC/D,CAAC;IAED,OAAM;AACR,CAAC;AAED,SAAS,OAAO,CAAC,MAAc;IAC7B,OAAO,IAAA,oCAAW,EAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAA;AACvD,CAAC;AAED,SAAS,SAAS,CAAC,MAAc,EAAE,KAAmB,EAAE,GAAiB;IACvE,MAAM,WAAW,GAAG,CAAa,CAAA;IACjC,OAAO,MAAM,CAAC,SAAS,IAAI,KAAK,GAAG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,IAAA,oCAAW,EAAC,GAAG,EAAE,WAAW,CAAC,CAAA;AACpG,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { RumPerformanceResourceTiming } from '../../browser/performanceObservable';
|
|
2
|
-
import type { RumConfiguration } from '../configuration';
|
|
3
|
-
import { getNavigationEntry } from '../../browser/performanceUtils';
|
|
4
|
-
export declare function retrieveInitialDocumentResourceTiming(configuration: RumConfiguration, callback: (timing: RumPerformanceResourceTiming) => void, getNavigationEntryImpl?: typeof getNavigationEntry): void;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.retrieveInitialDocumentResourceTiming = retrieveInitialDocumentResourceTiming;
|
|
4
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
5
|
-
const performanceObservable_1 = require("../../browser/performanceObservable");
|
|
6
|
-
const getDocumentTraceId_1 = require("../tracing/getDocumentTraceId");
|
|
7
|
-
const performanceUtils_1 = require("../../browser/performanceUtils");
|
|
8
|
-
const resourceUtils_1 = require("./resourceUtils");
|
|
9
|
-
function retrieveInitialDocumentResourceTiming(configuration, callback, getNavigationEntryImpl = performanceUtils_1.getNavigationEntry) {
|
|
10
|
-
(0, kubesense_browser_core_1.runOnReadyState)(configuration, 'interactive', () => {
|
|
11
|
-
const navigationEntry = getNavigationEntryImpl();
|
|
12
|
-
const entry = Object.assign(navigationEntry.toJSON(), {
|
|
13
|
-
entryType: performanceObservable_1.RumPerformanceEntryType.RESOURCE,
|
|
14
|
-
initiatorType: resourceUtils_1.FAKE_INITIAL_DOCUMENT,
|
|
15
|
-
// The ResourceTiming duration entry should be `responseEnd - startTime`. With
|
|
16
|
-
// NavigationTiming entries, `startTime` is always 0, so set it to `responseEnd`.
|
|
17
|
-
duration: navigationEntry.responseEnd,
|
|
18
|
-
traceId: (0, getDocumentTraceId_1.getDocumentTraceId)(document),
|
|
19
|
-
toJSON: () => ({ ...entry, toJSON: undefined }),
|
|
20
|
-
});
|
|
21
|
-
callback(entry);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=retrieveInitialDocumentResourceTiming.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retrieveInitialDocumentResourceTiming.js","sourceRoot":"","sources":["../../../src/domain/resource/retrieveInitialDocumentResourceTiming.ts"],"names":[],"mappings":";;AAQA,sFAkBC;AA1BD,8EAAmE;AACnE,+EAA6E;AAG7E,sEAAkE;AAClE,qEAAmE;AACnE,mDAAuD;AAEvD,SAAgB,qCAAqC,CACnD,aAA+B,EAC/B,QAAwD,EACxD,sBAAsB,GAAG,qCAAkB;IAE3C,IAAA,wCAAe,EAAC,aAAa,EAAE,aAAa,EAAE,GAAG,EAAE;QACjD,MAAM,eAAe,GAAG,sBAAsB,EAAE,CAAA;QAChD,MAAM,KAAK,GAAiC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE;YAClF,SAAS,EAAE,+CAAuB,CAAC,QAAiB;YACpD,aAAa,EAAE,qCAAqB;YACpC,8EAA8E;YAC9E,iFAAiF;YACjF,QAAQ,EAAE,eAAe,CAAC,WAAW;YACrC,OAAO,EAAE,IAAA,uCAAkB,EAAC,QAAQ,CAAC;YACrC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;SAChD,CAAC,CAAA;QACF,QAAQ,CAAC,KAAK,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { RelativeTime, TrackingConsentState } from '@kubesense/kubesense-browser-core';
|
|
2
|
-
import { Observable } from '@kubesense/kubesense-browser-core';
|
|
3
|
-
import type { RumConfiguration } from './configuration';
|
|
4
|
-
import type { LifeCycle } from './lifeCycle';
|
|
5
|
-
export declare const enum SessionType {
|
|
6
|
-
SYNTHETICS = "synthetics",
|
|
7
|
-
USER = "user",
|
|
8
|
-
CI_TEST = "ci_test"
|
|
9
|
-
}
|
|
10
|
-
export declare const RUM_SESSION_KEY = "rum";
|
|
11
|
-
export interface RumSessionManager {
|
|
12
|
-
findTrackedSession: (startTime?: RelativeTime) => RumSession | undefined;
|
|
13
|
-
expire: () => void;
|
|
14
|
-
expireObservable: Observable<void>;
|
|
15
|
-
setForcedReplay: () => void;
|
|
16
|
-
}
|
|
17
|
-
export interface RumSession {
|
|
18
|
-
id: string;
|
|
19
|
-
sessionReplay: SessionReplayState;
|
|
20
|
-
anonymousId?: string;
|
|
21
|
-
}
|
|
22
|
-
export declare const enum RumTrackingType {
|
|
23
|
-
NOT_TRACKED = "0",
|
|
24
|
-
TRACKED_WITH_SESSION_REPLAY = "1",
|
|
25
|
-
TRACKED_WITHOUT_SESSION_REPLAY = "2"
|
|
26
|
-
}
|
|
27
|
-
export declare const enum SessionReplayState {
|
|
28
|
-
OFF = 0,
|
|
29
|
-
SAMPLED = 1,
|
|
30
|
-
FORCED = 2
|
|
31
|
-
}
|
|
32
|
-
export declare function startRumSessionManager(configuration: RumConfiguration, lifeCycle: LifeCycle, trackingConsentState: TrackingConsentState): RumSessionManager;
|
|
33
|
-
/**
|
|
34
|
-
* Start a tracked replay session stub
|
|
35
|
-
*/
|
|
36
|
-
export declare function startRumSessionManagerStub(): RumSessionManager;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RUM_SESSION_KEY = void 0;
|
|
4
|
-
exports.startRumSessionManager = startRumSessionManager;
|
|
5
|
-
exports.startRumSessionManagerStub = startRumSessionManagerStub;
|
|
6
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
7
|
-
exports.RUM_SESSION_KEY = 'rum';
|
|
8
|
-
function startRumSessionManager(configuration, lifeCycle, trackingConsentState) {
|
|
9
|
-
const sessionManager = (0, kubesense_browser_core_1.startSessionManager)(configuration, exports.RUM_SESSION_KEY, (rawTrackingType) => computeTrackingType(configuration, rawTrackingType), trackingConsentState);
|
|
10
|
-
sessionManager.expireObservable.subscribe(() => {
|
|
11
|
-
lifeCycle.notify(9 /* LifeCycleEventType.SESSION_EXPIRED */);
|
|
12
|
-
});
|
|
13
|
-
sessionManager.renewObservable.subscribe(() => {
|
|
14
|
-
lifeCycle.notify(10 /* LifeCycleEventType.SESSION_RENEWED */);
|
|
15
|
-
});
|
|
16
|
-
sessionManager.sessionStateUpdateObservable.subscribe(({ previousState, newState }) => {
|
|
17
|
-
if (!previousState.forcedReplay && newState.forcedReplay) {
|
|
18
|
-
const sessionEntity = sessionManager.findSession();
|
|
19
|
-
if (sessionEntity) {
|
|
20
|
-
sessionEntity.isReplayForced = true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return {
|
|
25
|
-
findTrackedSession: (startTime) => {
|
|
26
|
-
const session = sessionManager.findSession(startTime);
|
|
27
|
-
if (!session || session.trackingType === "0" /* RumTrackingType.NOT_TRACKED */) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
id: session.id,
|
|
32
|
-
sessionReplay: session.trackingType === "1" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */
|
|
33
|
-
? 1 /* SessionReplayState.SAMPLED */
|
|
34
|
-
: session.isReplayForced
|
|
35
|
-
? 2 /* SessionReplayState.FORCED */
|
|
36
|
-
: 0 /* SessionReplayState.OFF */,
|
|
37
|
-
anonymousId: session.anonymousId,
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
expire: sessionManager.expire,
|
|
41
|
-
expireObservable: sessionManager.expireObservable,
|
|
42
|
-
setForcedReplay: () => sessionManager.updateSessionState({ forcedReplay: '1' }),
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Start a tracked replay session stub
|
|
47
|
-
*/
|
|
48
|
-
function startRumSessionManagerStub() {
|
|
49
|
-
const session = {
|
|
50
|
-
id: '00000000-aaaa-0000-aaaa-000000000000',
|
|
51
|
-
sessionReplay: (0, kubesense_browser_core_1.bridgeSupports)("records" /* BridgeCapability.RECORDS */) ? 1 /* SessionReplayState.SAMPLED */ : 0 /* SessionReplayState.OFF */,
|
|
52
|
-
};
|
|
53
|
-
return {
|
|
54
|
-
findTrackedSession: () => session,
|
|
55
|
-
expire: kubesense_browser_core_1.noop,
|
|
56
|
-
expireObservable: new kubesense_browser_core_1.Observable(),
|
|
57
|
-
setForcedReplay: kubesense_browser_core_1.noop,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function computeTrackingType(configuration, rawTrackingType) {
|
|
61
|
-
if (hasValidRumSession(rawTrackingType)) {
|
|
62
|
-
return rawTrackingType;
|
|
63
|
-
}
|
|
64
|
-
if (!(0, kubesense_browser_core_1.performDraw)(configuration.sessionSampleRate)) {
|
|
65
|
-
return "0" /* RumTrackingType.NOT_TRACKED */;
|
|
66
|
-
}
|
|
67
|
-
if (!(0, kubesense_browser_core_1.performDraw)(configuration.sessionReplaySampleRate)) {
|
|
68
|
-
return "2" /* RumTrackingType.TRACKED_WITHOUT_SESSION_REPLAY */;
|
|
69
|
-
}
|
|
70
|
-
return "1" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */;
|
|
71
|
-
}
|
|
72
|
-
function hasValidRumSession(trackingType) {
|
|
73
|
-
return (trackingType === "0" /* RumTrackingType.NOT_TRACKED */ ||
|
|
74
|
-
trackingType === "1" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */ ||
|
|
75
|
-
trackingType === "2" /* RumTrackingType.TRACKED_WITHOUT_SESSION_REPLAY */);
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=rumSessionManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rumSessionManager.js","sourceRoot":"","sources":["../../src/domain/rumSessionManager.ts"],"names":[],"mappings":";;;AA+CA,wDAiDC;AAKD,gEAWC;AA/GD,8EAQ0C;AAW7B,QAAA,eAAe,GAAG,KAAK,CAAA;AA2BpC,SAAgB,sBAAsB,CACpC,aAA+B,EAC/B,SAAoB,EACpB,oBAA0C;IAE1C,MAAM,cAAc,GAAG,IAAA,4CAAmB,EACxC,aAAa,EACb,uBAAe,EACf,CAAC,eAAe,EAAE,EAAE,CAAC,mBAAmB,CAAC,aAAa,EAAE,eAAe,CAAC,EACxE,oBAAoB,CACrB,CAAA;IAED,cAAc,CAAC,gBAAgB,CAAC,SAAS,CAAC,GAAG,EAAE;QAC7C,SAAS,CAAC,MAAM,4CAAoC,CAAA;IACtD,CAAC,CAAC,CAAA;IAEF,cAAc,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,EAAE;QAC5C,SAAS,CAAC,MAAM,6CAAoC,CAAA;IACtD,CAAC,CAAC,CAAA;IAEF,cAAc,CAAC,4BAA4B,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE;QACpF,IAAI,CAAC,aAAa,CAAC,YAAY,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;YACzD,MAAM,aAAa,GAAG,cAAc,CAAC,WAAW,EAAE,CAAA;YAClD,IAAI,aAAa,EAAE,CAAC;gBAClB,aAAa,CAAC,cAAc,GAAG,IAAI,CAAA;YACrC,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;IACF,OAAO;QACL,kBAAkB,EAAE,CAAC,SAAS,EAAE,EAAE;YAChC,MAAM,OAAO,GAAG,cAAc,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;YACrD,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,YAAY,0CAAgC,EAAE,CAAC;gBACrE,OAAM;YACR,CAAC;YACD,OAAO;gBACL,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,aAAa,EACX,OAAO,CAAC,YAAY,0DAAgD;oBAClE,CAAC;oBACD,CAAC,CAAC,OAAO,CAAC,cAAc;wBACtB,CAAC;wBACD,CAAC,+BAAuB;gBAC9B,WAAW,EAAE,OAAO,CAAC,WAAW;aACjC,CAAA;QACH,CAAC;QACD,MAAM,EAAE,cAAc,CAAC,MAAM;QAC7B,gBAAgB,EAAE,cAAc,CAAC,gBAAgB;QACjD,eAAe,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC;KAChF,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,0BAA0B;IACxC,MAAM,OAAO,GAAe;QAC1B,EAAE,EAAE,sCAAsC;QAC1C,aAAa,EAAE,IAAA,uCAAc,2CAA0B,CAAC,CAAC,oCAA4B,CAAC,+BAAuB;KAC9G,CAAA;IACD,OAAO;QACL,kBAAkB,EAAE,GAAG,EAAE,CAAC,OAAO;QACjC,MAAM,EAAE,6BAAI;QACZ,gBAAgB,EAAE,IAAI,mCAAU,EAAE;QAClC,eAAe,EAAE,6BAAI;KACtB,CAAA;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,aAA+B,EAAE,eAAwB;IACpF,IAAI,kBAAkB,CAAC,eAAe,CAAC,EAAE,CAAC;QACxC,OAAO,eAAe,CAAA;IACxB,CAAC;IACD,IAAI,CAAC,IAAA,oCAAW,EAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAClD,6CAAkC;IACpC,CAAC;IACD,IAAI,CAAC,IAAA,oCAAW,EAAC,aAAa,CAAC,uBAAuB,CAAC,EAAE,CAAC;QACxD,gEAAqD;IACvD,CAAC;IACD,6DAAkD;AACpD,CAAC;AAED,SAAS,kBAAkB,CAAC,YAAqB;IAC/C,OAAO,CACL,YAAY,0CAAgC;QAC5C,YAAY,0DAAgD;QAC5D,YAAY,6DAAmD,CAChE,CAAA;AACH,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function isSampled(sessionId: string, sampleRate: number): boolean;
|
|
2
|
-
export declare function resetSampleDecisionCache(): void;
|
|
3
|
-
/**
|
|
4
|
-
* Perform sampling using the Knuth factor method. This method offer consistent sampling result
|
|
5
|
-
* based on the provided identifier.
|
|
6
|
-
*
|
|
7
|
-
* @param identifier - The identifier to use for sampling.
|
|
8
|
-
* @param sampleRate - The sample rate in percentage between 0 and 100.
|
|
9
|
-
*/
|
|
10
|
-
export declare function sampleUsingKnuthFactor(identifier: bigint, sampleRate: number): boolean;
|