@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
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSampled = isSampled;
|
|
4
|
-
exports.resetSampleDecisionCache = resetSampleDecisionCache;
|
|
5
|
-
exports.sampleUsingKnuthFactor = sampleUsingKnuthFactor;
|
|
6
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
7
|
-
const sampleDecisionCache = new Map();
|
|
8
|
-
function isSampled(sessionId, sampleRate) {
|
|
9
|
-
// Shortcuts for common cases. This is not strictly necessary, but it makes the code faster for
|
|
10
|
-
// customers willing to ingest all traces.
|
|
11
|
-
if (sampleRate === 100) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
if (sampleRate === 0) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
const cachedDecision = sampleDecisionCache.get(sampleRate);
|
|
18
|
-
if (cachedDecision && sessionId === cachedDecision.sessionId) {
|
|
19
|
-
return cachedDecision.decision;
|
|
20
|
-
}
|
|
21
|
-
let decision;
|
|
22
|
-
// @ts-expect-error BigInt might not be defined in every browser we support
|
|
23
|
-
if (window.BigInt) {
|
|
24
|
-
decision = sampleUsingKnuthFactor(BigInt(`0x${sessionId.split('-')[4]}`), sampleRate);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
// For simplicity, we don't use consistent sampling for browser without BigInt support
|
|
28
|
-
// TODO: remove this when all browser we support have BigInt support
|
|
29
|
-
decision = (0, kubesense_browser_core_1.performDraw)(sampleRate);
|
|
30
|
-
}
|
|
31
|
-
sampleDecisionCache.set(sampleRate, { sessionId, decision });
|
|
32
|
-
return decision;
|
|
33
|
-
}
|
|
34
|
-
// Exported for tests
|
|
35
|
-
function resetSampleDecisionCache() {
|
|
36
|
-
sampleDecisionCache.clear();
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Perform sampling using the Knuth factor method. This method offer consistent sampling result
|
|
40
|
-
* based on the provided identifier.
|
|
41
|
-
*
|
|
42
|
-
* @param identifier - The identifier to use for sampling.
|
|
43
|
-
* @param sampleRate - The sample rate in percentage between 0 and 100.
|
|
44
|
-
*/
|
|
45
|
-
function sampleUsingKnuthFactor(identifier, sampleRate) {
|
|
46
|
-
// The formula is:
|
|
47
|
-
//
|
|
48
|
-
// (identifier * knuthFactor) % 2^64 < sampleRate * 2^64
|
|
49
|
-
//
|
|
50
|
-
// Because JavaScript numbers are 64-bit floats, we can't represent 64-bit integers, and the
|
|
51
|
-
// modulo would be incorrect. Thus, we are using BigInts here.
|
|
52
|
-
//
|
|
53
|
-
// Note: All implementations have slight variations. Some of them use '<=' instead of '<', and
|
|
54
|
-
// use `sampleRate * 2^64 - 1` instead of `sampleRate * 2^64`. The following implementation
|
|
55
|
-
// should adhere to the spec and is a bit simpler than using a 2^64-1 limit as there are less
|
|
56
|
-
// BigInt arithmetic to write. In practice this does not matter, as we are using floating point
|
|
57
|
-
// numbers in the end, and Number(2n**64n-1n) === Number(2n**64n).
|
|
58
|
-
const knuthFactor = BigInt('1111111111111111111');
|
|
59
|
-
const twoPow64 = BigInt('0x10000000000000000'); // 2n ** 64n
|
|
60
|
-
const hash = (identifier * knuthFactor) % twoPow64;
|
|
61
|
-
return Number(hash) <= (sampleRate / 100) * Number(twoPow64);
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=sampler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampler.js","sourceRoot":"","sources":["../../../src/domain/sampler/sampler.ts"],"names":[],"mappings":";;AAIA,8BA2BC;AAGD,4DAEC;AASD,wDAiBC;AA9DD,8EAA+D;AAE/D,MAAM,mBAAmB,GAA0D,IAAI,GAAG,EAAE,CAAA;AAE5F,SAAgB,SAAS,CAAC,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,CAAA;IACjD,MAAM,QAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAA,CAAC,YAAY;IAC3D,MAAM,IAAI,GAAG,CAAC,UAAU,GAAG,WAAW,CAAC,GAAG,QAAQ,CAAA;IAClD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC9D,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function isTraceSampled(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;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTraceSampled = isTraceSampled;
|
|
4
|
-
exports.resetSampleDecisionCache = resetSampleDecisionCache;
|
|
5
|
-
exports.sampleUsingKnuthFactor = sampleUsingKnuthFactor;
|
|
6
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
7
|
-
let sampleDecisionCache;
|
|
8
|
-
function isTraceSampled(sessionId, sampleRate) {
|
|
9
|
-
// Shortcuts for common cases. This is not strictly necessary, but it makes the code faster for
|
|
10
|
-
// customers willing to ingest all traces.
|
|
11
|
-
if (sampleRate === 100) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
if (sampleRate === 0) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
if (sampleDecisionCache && sessionId === sampleDecisionCache.sessionId) {
|
|
18
|
-
return sampleDecisionCache.decision;
|
|
19
|
-
}
|
|
20
|
-
let decision;
|
|
21
|
-
// @ts-expect-error BigInt might not be defined in every browser we support
|
|
22
|
-
if (window.BigInt) {
|
|
23
|
-
decision = sampleUsingKnuthFactor(BigInt(`0x${sessionId.split('-')[4]}`), sampleRate);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
// For simplicity, we don't use consistent sampling for browser without BigInt support
|
|
27
|
-
// TODO: remove this when all browser we support have BigInt support
|
|
28
|
-
decision = (0, kubesense_browser_core_1.performDraw)(sampleRate);
|
|
29
|
-
}
|
|
30
|
-
sampleDecisionCache = { sessionId, decision };
|
|
31
|
-
return decision;
|
|
32
|
-
}
|
|
33
|
-
// Exported for tests
|
|
34
|
-
function resetSampleDecisionCache() {
|
|
35
|
-
sampleDecisionCache = undefined;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Perform sampling using the Knuth factor method. This method offer consistent sampling result
|
|
39
|
-
* based on the provided identifier.
|
|
40
|
-
*
|
|
41
|
-
* @param identifier The identifier to use for sampling.
|
|
42
|
-
* @param sampleRate The sample rate in percentage between 0 and 100.
|
|
43
|
-
*/
|
|
44
|
-
function sampleUsingKnuthFactor(identifier, sampleRate) {
|
|
45
|
-
// The formula is:
|
|
46
|
-
//
|
|
47
|
-
// (identifier * knuthFactor) % 2^64 < sampleRate * 2^64
|
|
48
|
-
//
|
|
49
|
-
// Because JavaScript numbers are 64-bit floats, we can't represent 64-bit integers, and the
|
|
50
|
-
// modulo would be incorrect. Thus, we are using BigInts here.
|
|
51
|
-
//
|
|
52
|
-
// Implementation in other languages:
|
|
53
|
-
// * Go https://github.com/kubsense-ai/kubesense-trace-go/blob/ec6fbb1f2d517b7b8e69961052adf7136f3af773/ddtrace/tracer/sampler.go#L86-L91
|
|
54
|
-
// * Python https://github.com/kubsense/kubesense-trace-py/blob/0cee2f066fb6e79aa15947c1514c0f406dea47c5/ddtrace/sampling_rule.py#L197
|
|
55
|
-
// * Ruby https://github.com/kubsense/kubesense-trace-rb/blob/1a6e255cdcb7e7e22235ea5955f90f6dfa91045d/lib/kubesense/tracing/sampling/rate_sampler.rb#L42
|
|
56
|
-
// * C++ https://github.com/kubsense/kubesense-trace-cpp/blob/159629edc438ae45f2bb318eb7bd51abd05e94b5/src/kubesense/trace_sampler.cpp#L58
|
|
57
|
-
// * Java https://github.com/kubsense/kubesense-trace-java/blob/896dd6b380533216e0bdee59614606c8272d313e/kubesense-trace-core/src/main/java/kubesense/trace/common/sampling/DeterministicSampler.java#L48
|
|
58
|
-
//
|
|
59
|
-
// Note: All implementations have slight variations. Some of them use '<=' instead of '<', and
|
|
60
|
-
// use `sampleRate * 2^64 - 1` instead of `sampleRate * 2^64`. The following implementation
|
|
61
|
-
// should adhere to the spec and is a bit simpler than using a 2^64-1 limit as there are less
|
|
62
|
-
// BigInt arithmetic to write. In practice this does not matter, as we are using floating point
|
|
63
|
-
// numbers in the end, and Number(2n**64n-1n) === Number(2n**64n).
|
|
64
|
-
const knuthFactor = BigInt('1111111111111111111');
|
|
65
|
-
const twoPow64 = BigInt('0x10000000000000000'); // 2n ** 64n
|
|
66
|
-
const hash = (identifier * knuthFactor) % twoPow64;
|
|
67
|
-
return Number(hash) <= (sampleRate / 100) * Number(twoPow64);
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=sampler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampler.js","sourceRoot":"","sources":["../../../src/domain/tracing/sampler.ts"],"names":[],"mappings":";;AAIA,wCA0BC;AAGD,4DAEC;AASD,wDAwBC;AApED,8EAA+D;AAE/D,IAAI,mBAAyE,CAAA;AAE7E,SAAgB,cAAc,CAAC,SAAiB,EAAE,UAAkB;IAClE,+FAA+F;IAC/F,0CAA0C;IAC1C,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;QACvB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,UAAU,KAAK,CAAC,EAAE,C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AAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC9D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tracer.types.js","sourceRoot":"","sources":["../../../src/domain/tracing/tracer.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Telemetry } from '@kubesense/kubesense-browser-core';
|
|
2
|
-
import { noop } from '@kubesense/kubesense-browser-core';
|
|
3
|
-
import type { LifeCycle } from '../../lifeCycle';
|
|
4
|
-
export declare function startInitialViewMetricsTelemetry(lifeCycle: LifeCycle, telemetry: Telemetry): {
|
|
5
|
-
stop: typeof noop;
|
|
6
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startInitialViewMetricsTelemetry = startInitialViewMetricsTelemetry;
|
|
4
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
5
|
-
function startInitialViewMetricsTelemetry(lifeCycle, telemetry) {
|
|
6
|
-
if (!telemetry.metricsEnabled) {
|
|
7
|
-
return { stop: kubesense_browser_core_1.noop };
|
|
8
|
-
}
|
|
9
|
-
const { unsubscribe } = lifeCycle.subscribe(4 /* LifeCycleEventType.VIEW_UPDATED */, ({ initialViewMetrics }) => {
|
|
10
|
-
if (!initialViewMetrics.largestContentfulPaint || !initialViewMetrics.navigationTimings) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
// The navigation timings become available shortly after the load event fires, so
|
|
14
|
-
// we're snapshotting the LCP value available at that point. However, more LCP values
|
|
15
|
-
// can be emitted until the page is scrolled or interacted with, so it's possible that
|
|
16
|
-
// the final LCP value may differ. These metrics are intended to help diagnose
|
|
17
|
-
// performance issues early in the page load process, and using LCP-at-page-load is a
|
|
18
|
-
// good fit for that use case, but it's important to be aware that this is not
|
|
19
|
-
// necessarily equivalent to the normal LCP metric.
|
|
20
|
-
// monitor-until: 2026-07-01
|
|
21
|
-
(0, kubesense_browser_core_1.addTelemetryMetrics)("Initial view metrics" /* TelemetryMetrics.INITIAL_VIEW_METRICS_TELEMETRY_NAME */, {
|
|
22
|
-
metrics: createCoreInitialViewMetrics(initialViewMetrics.largestContentfulPaint, initialViewMetrics.navigationTimings),
|
|
23
|
-
});
|
|
24
|
-
unsubscribe();
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
stop: unsubscribe,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function createCoreInitialViewMetrics(lcp, navigation) {
|
|
31
|
-
return {
|
|
32
|
-
lcp: {
|
|
33
|
-
value: lcp.value,
|
|
34
|
-
},
|
|
35
|
-
navigation: {
|
|
36
|
-
domComplete: navigation.domComplete,
|
|
37
|
-
domContentLoaded: navigation.domContentLoaded,
|
|
38
|
-
domInteractive: navigation.domInteractive,
|
|
39
|
-
firstByte: navigation.firstByte,
|
|
40
|
-
loadEvent: navigation.loadEvent,
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=startInitialViewMetricsTelemetry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startInitialViewMetricsTelemetry.js","sourceRoot":"","sources":["../../../../src/domain/view/viewMetrics/startInitialViewMetricsTelemetry.ts"],"names":[],"mappings":";;AAoBA,4EA+BC;AAlDD,8EAA+F;AAmB/F,SAAgB,gCAAgC,CAAC,SAAoB,EAAE,SAAoB;IACzF,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,6BAAI,EAAE,CAAA;IACvB,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,SAAS,0CAAkC,CAAC,EAAE,kBAAkB,EAAE,EAAE,EAAE;QACtG,IAAI,CAAC,kBAAkB,CAAC,sBAAsB,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,CAAC;YACxF,OAAM;QACR,CAAC;QAED,iFAAiF;QACjF,qFAAqF;QACrF,sFAAsF;QACtF,8EAA8E;QAC9E,qFAAqF;QACrF,8EAA8E;QAC9E,mDAAmD;QACnD,4BAA4B;QAC5B,IAAA,4CAAmB,qFAAuD;YACxE,OAAO,EAAE,4BAA4B,CACnC,kBAAkB,CAAC,sBAAsB,EACzC,kBAAkB,CAAC,iBAAiB,CACrC;SACF,CAAC,CAAA;QAEF,WAAW,EAAE,CAAA;IACf,CAAC,CAAC,CAAA;IAEF,OAAO;QACL,IAAI,EAAE,WAAW;KAClB,CAAA;AACH,CAAC;AAED,SAAS,4BAA4B,CACnC,GAA2B,EAC3B,UAA6B;IAE7B,OAAO;QACL,GAAG,EAAE;YACH,KAAK,EAAE,GAAG,CAAC,KAAK;SACjB;QACD,UAAU,EAAE;YACV,WAAW,EAAE,UAAU,CAAC,WAAW;YACnC,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;YAC7C,cAAc,EAAE,UAAU,CAAC,cAAc;YACzC,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,SAAS,EAAE,UAAU,CAAC,SAAS;SAChC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Duration, RelativeTime } from '@kubesense/kubesense-browser-core';
|
|
2
|
-
import type { RumConfiguration } from '../../configuration';
|
|
3
|
-
import type { FirstHidden } from './trackFirstHidden';
|
|
4
|
-
export interface FirstInput {
|
|
5
|
-
delay: Duration;
|
|
6
|
-
time: RelativeTime;
|
|
7
|
-
targetSelector?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Track the first input occurring during the initial View to return:
|
|
11
|
-
* - First Input Delay
|
|
12
|
-
* - First Input Time
|
|
13
|
-
* Callback is called at most one time.
|
|
14
|
-
* Documentation: https://web.dev/fid/
|
|
15
|
-
* Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/master/src/getFID.ts
|
|
16
|
-
*/
|
|
17
|
-
export declare function trackFirstInput(configuration: RumConfiguration, firstHidden: FirstHidden, callback: (firstInput: FirstInput) => void): {
|
|
18
|
-
stop: () => void;
|
|
19
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.trackFirstInput = trackFirstInput;
|
|
4
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
5
|
-
const htmlDomUtils_1 = require("../../../browser/htmlDomUtils");
|
|
6
|
-
const performanceObservable_1 = require("../../../browser/performanceObservable");
|
|
7
|
-
const getSelectorFromElement_1 = require("../../getSelectorFromElement");
|
|
8
|
-
/**
|
|
9
|
-
* Track the first input occurring during the initial View to return:
|
|
10
|
-
* - First Input Delay
|
|
11
|
-
* - First Input Time
|
|
12
|
-
* Callback is called at most one time.
|
|
13
|
-
* Documentation: https://web.dev/fid/
|
|
14
|
-
* Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/master/src/getFID.ts
|
|
15
|
-
*/
|
|
16
|
-
function trackFirstInput(configuration, firstHidden, callback) {
|
|
17
|
-
const performanceFirstInputSubscription = (0, performanceObservable_1.createPerformanceObservable)(configuration, {
|
|
18
|
-
type: performanceObservable_1.RumPerformanceEntryType.FIRST_INPUT,
|
|
19
|
-
buffered: true,
|
|
20
|
-
}).subscribe((entries) => {
|
|
21
|
-
const firstInputEntry = entries.find((entry) => entry.startTime < firstHidden.timeStamp);
|
|
22
|
-
if (firstInputEntry) {
|
|
23
|
-
const firstInputDelay = (0, kubesense_browser_core_1.elapsed)(firstInputEntry.startTime, firstInputEntry.processingStart);
|
|
24
|
-
let firstInputTargetSelector;
|
|
25
|
-
if (firstInputEntry.target && (0, htmlDomUtils_1.isElementNode)(firstInputEntry.target)) {
|
|
26
|
-
firstInputTargetSelector = (0, getSelectorFromElement_1.getSelectorFromElement)(firstInputEntry.target, configuration.actionNameAttribute);
|
|
27
|
-
}
|
|
28
|
-
callback({
|
|
29
|
-
// Ensure firstInputDelay to be positive, see
|
|
30
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=1185815
|
|
31
|
-
delay: firstInputDelay >= 0 ? firstInputDelay : 0,
|
|
32
|
-
time: firstInputEntry.startTime,
|
|
33
|
-
targetSelector: firstInputTargetSelector,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
return {
|
|
38
|
-
stop: () => {
|
|
39
|
-
performanceFirstInputSubscription.unsubscribe();
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=trackFirstInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trackFirstInput.js","sourceRoot":"","sources":["../../../../src/domain/view/viewMetrics/trackFirstInput.ts"],"names":[],"mappings":";;AAuBA,0CAmCC;AAzDD,8EAA2D;AAC3D,gEAA6D;AAE7D,kFAA6G;AAE7G,yEAAqE;AASrE;;;;;;;GAOG;AACH,SAAgB,eAAe,CAC7B,aAA+B,EAC/B,WAAwB,EACxB,QAA0C;IAE1C,MAAM,iCAAiC,GAAG,IAAA,mDAA2B,EAAC,aAAa,EAAE;QACnF,IAAI,EAAE,+CAAuB,CAAC,WAAW;QACzC,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;QACvB,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAClC,CAAC,KAAK,EAAgC,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CACjF,CAAA;QACD,IAAI,eAAe,EAAE,CAAC;YACpB,MAAM,eAAe,GAAG,IAAA,gCAAO,EAAC,eAAe,CAAC,SAAS,EAAE,eAAe,CAAC,eAAe,CAAC,CAAA;YAC3F,IAAI,wBAAwB,CAAA;YAE5B,IAAI,eAAe,CAAC,MAAM,IAAI,IAAA,4BAAa,EAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;gBACpE,wBAAwB,GAAG,IAAA,+CAAsB,EAAC,eAAe,CAAC,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;YAC9G,CAAC;YAED,QAAQ,CAAC;gBACP,6CAA6C;gBAC7C,gEAAgE;gBAChE,KAAK,EAAE,eAAe,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAE,CAAc;gBAC/D,IAAI,EAAE,eAAe,CAAC,SAAS;gBAC/B,cAAc,EAAE,wBAAwB;aACzC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO;QACL,IAAI,EAAE,GAAG,EAAE;YACT,iCAAiC,CAAC,WAAW,EAAE,CAAA;QACjD,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"domainContext.types.js","sourceRoot":"","sources":["../src/domainContext.types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,oDAAsD;AAA7C,gHAAA,gBAAgB,OAAA;AAyBzB,yDAA+E;AAAtE,+GAAA,UAAU,OAAA;AAAE,iHAAA,YAAY,OAAA;AAAE,oHAAA,eAAe,OAAA;AAClD,4CAA0C;AAAjC,oGAAA,QAAQ,OAAA;AAEjB,gDAAkE;AAAzD,sGAAA,SAAS,OAAA;AAIlB,6DAAgE;AAAvD,+GAAA,gBAAgB,OAAA;AAEzB,yEAAgF;AAAvE,uIAAA,8BAA8B,OAAA;AAQvC,mEAA2F;AAAlF,4HAAA,sBAAsB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AACrD,2CAAyD;AAAhD,oGAAA,UAAU,OAAA;AAAE,oGAAA,UAAU,OAAA;AAQ/B,wDAAwE;AAA/D,kHAAA,iBAAiB,OAAA;AAAE,6GAAA,YAAY,OAAA;AACxC,2EAAgG;AAAvF,iJAAA,0CAA0C,OAAA;AACnD,0EAAmE;AAA1D,2HAAA,iBAAiB,OAAA;AAC1B,yDAAsC;AACtC,oEAAkE;AAAzD,0HAAA,mBAAmB,OAAA;AAC5B,iEAAuE;AAA9D,sHAAA,qBAAqB,OAAA;AAC9B,mDAAgC;AAChC,4DAAyC;AAIzC,yEAA+E;AAAtE,sIAAA,6BAA6B,OAAA;AACtC,yEAAyE;AAAhE,gIAAA,uBAAuB,OAAA;AAShC,wCAA4C;AAAnC,oGAAA,WAAW,OAAA;AACpB,oDAAoD;AAA3C,oGAAA,SAAS,OAAA;AAGlB,mEAAuE;AAA9D,4HAAA,uBAAuB,OAAA"}
|
package/cjs/rumEvent.types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rumEvent.types.js","sourceRoot":"","sources":["../src/rumEvent.types.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB;;GAEG"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TrackingConsentState, DeflateWorker } from '@kubesense/kubesense-browser-core';
|
|
2
|
-
import type { RumConfiguration } from '../domain/configuration';
|
|
3
|
-
import type { ViewOptions } from '../domain/view/trackViews';
|
|
4
|
-
import type { CustomVitalsState } from '../domain/vital/vitalCollection';
|
|
5
|
-
import type { StartRumResult } from './startRum';
|
|
6
|
-
import type { RumPublicApiOptions, Strategy } from './rumPublicApi';
|
|
7
|
-
export declare function createPreStartStrategy({ ignoreInitIfSyntheticsWillInjectRum, startDeflateWorker }: RumPublicApiOptions, trackingConsentState: TrackingConsentState, customVitalsState: CustomVitalsState, doStartRum: (configuration: RumConfiguration, deflateWorker: DeflateWorker | undefined, initialViewOptions?: ViewOptions) => StartRumResult): Strategy;
|
package/esm/boot/preStartRum.js
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { createBoundedBuffer, display, canUseEventBridge, displayAlreadyInitializedError, willSyntheticsInjectRum, noop, timeStampNow, clocksNow, getEventBridge, initFeatureFlags, addTelemetryConfiguration, initFetchObservable, CustomerContextKey, buildAccountContextManager, buildGlobalContextManager, buildUserContextManager, monitorError, sanitize, } from '@kubesense/kubesense-browser-core';
|
|
2
|
-
import { validateAndBuildRumConfiguration, fetchAndApplyRemoteConfiguration, serializeRumConfiguration, applyCachedSdkConfiguration, scheduleSdkConfigurationRefresh, } from '../domain/configuration';
|
|
3
|
-
import { startDurationVital, stopDurationVital } from '../domain/vital/vitalCollection';
|
|
4
|
-
import { callPluginsMethod } from '../domain/plugins';
|
|
5
|
-
export function createPreStartStrategy({ ignoreInitIfSyntheticsWillInjectRum = true, startDeflateWorker }, trackingConsentState, customVitalsState, doStartRum) {
|
|
6
|
-
const bufferApiCalls = createBoundedBuffer();
|
|
7
|
-
// TODO next major: remove the globalContextManager, userContextManager and accountContextManager from preStartStrategy and use an empty context instead
|
|
8
|
-
const globalContext = buildGlobalContextManager();
|
|
9
|
-
bufferContextCalls(globalContext, CustomerContextKey.globalContext, bufferApiCalls);
|
|
10
|
-
const userContext = buildUserContextManager();
|
|
11
|
-
bufferContextCalls(userContext, CustomerContextKey.userContext, bufferApiCalls);
|
|
12
|
-
const accountContext = buildAccountContextManager();
|
|
13
|
-
bufferContextCalls(accountContext, CustomerContextKey.accountContext, bufferApiCalls);
|
|
14
|
-
let firstStartViewCall;
|
|
15
|
-
let deflateWorker;
|
|
16
|
-
let cachedInitConfiguration;
|
|
17
|
-
let cachedConfiguration;
|
|
18
|
-
const trackingConsentStateSubscription = trackingConsentState.observable.subscribe(tryStartRum);
|
|
19
|
-
const emptyContext = {};
|
|
20
|
-
function tryStartRum() {
|
|
21
|
-
if (!cachedInitConfiguration || !cachedConfiguration || !trackingConsentState.isGranted()) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
trackingConsentStateSubscription.unsubscribe();
|
|
25
|
-
let initialViewOptions;
|
|
26
|
-
if (cachedConfiguration.trackViewsManually) {
|
|
27
|
-
if (!firstStartViewCall) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
// An initial view is always created when starting RUM.
|
|
31
|
-
// When tracking views automatically, any startView call before RUM start creates an extra
|
|
32
|
-
// view.
|
|
33
|
-
// When tracking views manually, we use the ViewOptions from the first startView call as the
|
|
34
|
-
// initial view options, and we remove the actual startView call so we don't create an extra
|
|
35
|
-
// view.
|
|
36
|
-
bufferApiCalls.remove(firstStartViewCall.callback);
|
|
37
|
-
initialViewOptions = firstStartViewCall.options;
|
|
38
|
-
}
|
|
39
|
-
const startRumResult = doStartRum(cachedConfiguration, deflateWorker, initialViewOptions);
|
|
40
|
-
bufferApiCalls.drain(startRumResult);
|
|
41
|
-
}
|
|
42
|
-
function doInit(initConfiguration, errorStack) {
|
|
43
|
-
const eventBridgeAvailable = canUseEventBridge();
|
|
44
|
-
if (eventBridgeAvailable) {
|
|
45
|
-
initConfiguration = overrideInitConfigurationForBridge(initConfiguration);
|
|
46
|
-
}
|
|
47
|
-
const remoteSdkConfigurationEnabled = !!initConfiguration.enableRemoteSdkConfiguration;
|
|
48
|
-
if (remoteSdkConfigurationEnabled) {
|
|
49
|
-
// Reading the cached document is synchronous and network-free, so it does not delay
|
|
50
|
-
// initialization. The document fetched below only applies from the next page load.
|
|
51
|
-
const cachedSdkConfiguration = applyCachedSdkConfiguration(initConfiguration);
|
|
52
|
-
initConfiguration = cachedSdkConfiguration.initConfiguration;
|
|
53
|
-
if (!cachedSdkConfiguration.rumEnabled) {
|
|
54
|
-
// RUM is switched off from the dashboard. Still refresh the document, otherwise the
|
|
55
|
-
// switch would be one-way: the SDK could never learn that it has been turned back on.
|
|
56
|
-
cachedInitConfiguration = initConfiguration;
|
|
57
|
-
scheduleSdkConfigurationRefresh(initConfiguration).catch(monitorError);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
// Update the exposed initConfiguration to reflect the bridge and remote configuration overrides
|
|
62
|
-
cachedInitConfiguration = initConfiguration;
|
|
63
|
-
addTelemetryConfiguration(serializeRumConfiguration(initConfiguration));
|
|
64
|
-
if (cachedConfiguration) {
|
|
65
|
-
displayAlreadyInitializedError('KUBESENSE_SDK', initConfiguration);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const configuration = validateAndBuildRumConfiguration(initConfiguration, errorStack);
|
|
69
|
-
if (!configuration) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (!eventBridgeAvailable && !configuration.sessionStoreStrategyType) {
|
|
73
|
-
display.warn('No storage available for session. We will not send any data.');
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (configuration.compressIntakeRequests && !eventBridgeAvailable && startDeflateWorker) {
|
|
77
|
-
deflateWorker = startDeflateWorker(configuration, 'KubeSense RUM',
|
|
78
|
-
// Worker initialization can fail asynchronously, especially in Firefox where even CSP
|
|
79
|
-
// issues are reported asynchronously. For now, the SDK will continue its execution even if
|
|
80
|
-
// data won't be sent to KubeSense. We could improve this behavior in the future.
|
|
81
|
-
noop);
|
|
82
|
-
if (!deflateWorker) {
|
|
83
|
-
// `startDeflateWorker` should have logged an error message explaining the issue
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
cachedConfiguration = configuration;
|
|
88
|
-
// Instrument fetch to track network requests
|
|
89
|
-
// This is needed in case the consent is not granted and some customer
|
|
90
|
-
// library (Apollo Client) is storing uninstrumented fetch to be used later
|
|
91
|
-
// The subscription is needed so that the instrumentation process is completed
|
|
92
|
-
initFetchObservable().subscribe(noop);
|
|
93
|
-
trackingConsentState.tryToInit(configuration.trackingConsent);
|
|
94
|
-
tryStartRum();
|
|
95
|
-
if (remoteSdkConfigurationEnabled) {
|
|
96
|
-
// Fire-and-forget, after the SDK is running: refreshes the cache for the next page load.
|
|
97
|
-
scheduleSdkConfigurationRefresh(initConfiguration).catch(monitorError);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
const addDurationVital = (vital) => {
|
|
101
|
-
bufferApiCalls.add((startRumResult) => startRumResult.addDurationVital(vital));
|
|
102
|
-
};
|
|
103
|
-
const addOperationStepVital = (name, stepType, options, failureReason) => {
|
|
104
|
-
bufferApiCalls.add((startRumResult) => startRumResult.addOperationStepVital(sanitize(name), stepType, sanitize(options), sanitize(failureReason)));
|
|
105
|
-
};
|
|
106
|
-
const strategy = {
|
|
107
|
-
init(initConfiguration, publicApi, errorStack) {
|
|
108
|
-
if (!initConfiguration) {
|
|
109
|
-
display.error('Missing configuration');
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
// Set the experimental feature flags as early as possible, so we can use them in most places
|
|
113
|
-
initFeatureFlags(initConfiguration.enableExperimentalFeatures);
|
|
114
|
-
// Expose the initial configuration regardless of initialization success.
|
|
115
|
-
cachedInitConfiguration = initConfiguration;
|
|
116
|
-
// If we are in a Synthetics test configured to automatically inject a RUM instance, we want
|
|
117
|
-
// to completely discard the customer application RUM instance by ignoring their init() call.
|
|
118
|
-
// But, we should not ignore the init() call from the Synthetics-injected RUM instance, so the
|
|
119
|
-
// internal `ignoreInitIfSyntheticsWillInjectRum` option is here to bypass this condition.
|
|
120
|
-
if (ignoreInitIfSyntheticsWillInjectRum && willSyntheticsInjectRum()) {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
callPluginsMethod(initConfiguration.plugins, 'onInit', { initConfiguration, publicApi });
|
|
124
|
-
if (initConfiguration.remoteConfigurationId) {
|
|
125
|
-
fetchAndApplyRemoteConfiguration(initConfiguration, { user: userContext, context: globalContext })
|
|
126
|
-
.then((initConfiguration) => {
|
|
127
|
-
if (initConfiguration) {
|
|
128
|
-
doInit(initConfiguration, errorStack);
|
|
129
|
-
}
|
|
130
|
-
})
|
|
131
|
-
.catch(monitorError);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
doInit(initConfiguration, errorStack);
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
get initConfiguration() {
|
|
138
|
-
return cachedInitConfiguration;
|
|
139
|
-
},
|
|
140
|
-
getInternalContext: noop,
|
|
141
|
-
stopSession: noop,
|
|
142
|
-
addTiming(name, time = timeStampNow()) {
|
|
143
|
-
bufferApiCalls.add((startRumResult) => startRumResult.addTiming(name, time));
|
|
144
|
-
},
|
|
145
|
-
startView(options, startClocks = clocksNow()) {
|
|
146
|
-
const callback = (startRumResult) => {
|
|
147
|
-
startRumResult.startView(options, startClocks);
|
|
148
|
-
};
|
|
149
|
-
bufferApiCalls.add(callback);
|
|
150
|
-
if (!firstStartViewCall) {
|
|
151
|
-
firstStartViewCall = { options, callback };
|
|
152
|
-
tryStartRum();
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
setViewName(name) {
|
|
156
|
-
bufferApiCalls.add((startRumResult) => startRumResult.setViewName(name));
|
|
157
|
-
},
|
|
158
|
-
// View context APIs
|
|
159
|
-
setViewContext(context) {
|
|
160
|
-
bufferApiCalls.add((startRumResult) => startRumResult.setViewContext(context));
|
|
161
|
-
},
|
|
162
|
-
setViewContextProperty(key, value) {
|
|
163
|
-
bufferApiCalls.add((startRumResult) => startRumResult.setViewContextProperty(key, value));
|
|
164
|
-
},
|
|
165
|
-
getViewContext: () => emptyContext,
|
|
166
|
-
globalContext,
|
|
167
|
-
userContext,
|
|
168
|
-
accountContext,
|
|
169
|
-
addAction(action) {
|
|
170
|
-
bufferApiCalls.add((startRumResult) => startRumResult.addAction(action));
|
|
171
|
-
},
|
|
172
|
-
addError(providedError) {
|
|
173
|
-
bufferApiCalls.add((startRumResult) => startRumResult.addError(providedError));
|
|
174
|
-
},
|
|
175
|
-
addFeatureFlagEvaluation(key, value) {
|
|
176
|
-
bufferApiCalls.add((startRumResult) => startRumResult.addFeatureFlagEvaluation(key, value));
|
|
177
|
-
},
|
|
178
|
-
startDurationVital(name, options) {
|
|
179
|
-
return startDurationVital(customVitalsState, name, options);
|
|
180
|
-
},
|
|
181
|
-
stopDurationVital(name, options) {
|
|
182
|
-
stopDurationVital(addDurationVital, customVitalsState, name, options);
|
|
183
|
-
},
|
|
184
|
-
addDurationVital,
|
|
185
|
-
addOperationStepVital,
|
|
186
|
-
};
|
|
187
|
-
return strategy;
|
|
188
|
-
}
|
|
189
|
-
function overrideInitConfigurationForBridge(initConfiguration) {
|
|
190
|
-
var _a, _b;
|
|
191
|
-
return {
|
|
192
|
-
...initConfiguration,
|
|
193
|
-
applicationId: '00000000-aaaa-0000-aaaa-000000000000',
|
|
194
|
-
clientToken: 'empty',
|
|
195
|
-
sessionSampleRate: 100,
|
|
196
|
-
defaultPrivacyLevel: (_a = initConfiguration.defaultPrivacyLevel) !== null && _a !== void 0 ? _a : (_b = getEventBridge()) === null || _b === void 0 ? void 0 : _b.getPrivacyLevel(),
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
function bufferContextCalls(preStartContextManager, name, bufferApiCalls) {
|
|
200
|
-
preStartContextManager.changeObservable.subscribe(() => {
|
|
201
|
-
const context = preStartContextManager.getContext();
|
|
202
|
-
bufferApiCalls.add((startRumResult) => startRumResult[name].setContext(context));
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
//# sourceMappingURL=preStartRum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preStartRum.js","sourceRoot":"","sources":["../../src/boot/preStartRum.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,OAAO,EACP,iBAAiB,EACjB,8BAA8B,EAC9B,uBAAuB,EACvB,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACvB,YAAY,EACZ,QAAQ,GACT,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EACL,gCAAgC,EAChC,gCAAgC,E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