@kubesense/kubesense-browser-rum-core 1.7.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,243 +1,285 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
const require_extractRegexMatch = require("../extractRegexMatch.js");
|
|
2
|
+
const require_jsonPathParser = require("./jsonPathParser.js");
|
|
3
|
+
const require_remoteConfigurationCache = require("./remoteConfigurationCache.js");
|
|
4
|
+
let _kubesense_kubesense_js_core_util = require("@kubesense/kubesense-js-core/util");
|
|
5
|
+
let _kubesense_kubesense_browser_core = require("@kubesense/kubesense-browser-core");
|
|
6
|
+
let _kubesense_kubesense_js_core_monitor = require("@kubesense/kubesense-js-core/monitor");
|
|
7
|
+
let _kubesense_kubesense_js_core_transport = require("@kubesense/kubesense-js-core/transport");
|
|
8
|
+
//#region src/domain/configuration/remoteConfiguration.ts
|
|
9
|
+
const REMOTE_CONFIGURATION_VERSION = "v1";
|
|
10
|
+
const SUPPORTED_RUM_FIELDS = [
|
|
11
|
+
"applicationId",
|
|
12
|
+
"service",
|
|
13
|
+
"env",
|
|
14
|
+
"version",
|
|
15
|
+
"sessionSampleRate",
|
|
16
|
+
"sessionReplaySampleRate",
|
|
17
|
+
"telemetrySampleRate",
|
|
18
|
+
"trackAnonymousUser",
|
|
19
|
+
"trackUserInteractions",
|
|
20
|
+
"trackResources",
|
|
21
|
+
"trackLongTasks",
|
|
22
|
+
"traceContextInjection",
|
|
23
|
+
"actionNameAttribute",
|
|
24
|
+
"defaultPrivacyLevel",
|
|
25
|
+
"enablePrivacyForActionName",
|
|
26
|
+
"traceSampleRate",
|
|
27
|
+
"trackSessionAcrossSubdomains",
|
|
28
|
+
"allowedTracingUrls",
|
|
29
|
+
"allowedTrackingOrigins"
|
|
24
30
|
];
|
|
25
31
|
async function fetchAndApplyRemoteConfiguration(initConfiguration, supportedContextManagers) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
(0, kubesense_browser_core_1.addTelemetryMetrics)("remote configuration metrics" /* TelemetryMetrics.REMOTE_CONFIGURATION_METRIC_NAME */, { metrics: metrics.get() });
|
|
39
|
-
return rumInitConfiguration;
|
|
32
|
+
let rumInitConfiguration;
|
|
33
|
+
const metrics = initMetrics();
|
|
34
|
+
const fetchResult = await fetchRemoteConfiguration(initConfiguration);
|
|
35
|
+
if (!fetchResult.ok) {
|
|
36
|
+
metrics.increment("fetch", "failure");
|
|
37
|
+
_kubesense_kubesense_browser_core.display.error(fetchResult.error);
|
|
38
|
+
} else {
|
|
39
|
+
metrics.increment("fetch", "success");
|
|
40
|
+
rumInitConfiguration = applyRemoteConfiguration(initConfiguration, fetchResult.value, supportedContextManagers, metrics);
|
|
41
|
+
}
|
|
42
|
+
(0, _kubesense_kubesense_browser_core.addTelemetryMetrics)(_kubesense_kubesense_browser_core.TelemetryMetrics.REMOTE_CONFIGURATION_METRIC_NAME, { metrics: metrics.get() });
|
|
43
|
+
return rumInitConfiguration;
|
|
40
44
|
}
|
|
41
|
-
function applyRemoteConfiguration(initConfiguration,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
45
|
+
function applyRemoteConfiguration(initConfiguration, remoteConfiguration, supportedContextManagers, metrics) {
|
|
46
|
+
const appliedConfiguration = { ...initConfiguration };
|
|
47
|
+
if (remoteConfiguration.rum) {
|
|
48
|
+
const rumRemoteConfiguration = remoteConfiguration.rum;
|
|
49
|
+
SUPPORTED_RUM_FIELDS.forEach((option) => {
|
|
50
|
+
if (option in rumRemoteConfiguration) appliedConfiguration[option] = resolveConfigurationProperty(rumRemoteConfiguration[option]);
|
|
51
|
+
});
|
|
52
|
+
Object.keys(supportedContextManagers).forEach((context) => {
|
|
53
|
+
if (rumRemoteConfiguration[context] !== void 0) resolveContextProperty(supportedContextManagers[context], rumRemoteConfiguration[context]);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (remoteConfiguration.profiling?.sampleRate !== void 0) appliedConfiguration.profilingSampleRate = remoteConfiguration.profiling.sampleRate;
|
|
57
|
+
return appliedConfiguration;
|
|
58
|
+
function resolveConfigurationProperty(property) {
|
|
59
|
+
if (Array.isArray(property)) return property.map(resolveConfigurationProperty);
|
|
60
|
+
if ((0, _kubesense_kubesense_js_core_util.isIndexableObject)(property)) {
|
|
61
|
+
if (isSerializedOption(property)) {
|
|
62
|
+
const type = property.rcSerializedType;
|
|
63
|
+
switch (type) {
|
|
64
|
+
case "string": return property.value;
|
|
65
|
+
case "regex": return resolveRegex(property.value);
|
|
66
|
+
case "dynamic": return resolveDynamicOption(property);
|
|
67
|
+
default:
|
|
68
|
+
_kubesense_kubesense_browser_core.display.error(`Unsupported remote configuration: "rcSerializedType": "${type}"`);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return (0, _kubesense_kubesense_browser_core.mapValues)(property, resolveConfigurationProperty);
|
|
73
|
+
}
|
|
74
|
+
return property;
|
|
75
|
+
}
|
|
76
|
+
function resolveContextProperty(contextManager, contextItems) {
|
|
77
|
+
contextItems.forEach(({ key, value }) => {
|
|
78
|
+
contextManager.setContextProperty(key, resolveConfigurationProperty(value));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function resolveDynamicOption(property) {
|
|
82
|
+
const strategy = property.strategy;
|
|
83
|
+
let resolvedValue;
|
|
84
|
+
switch (strategy) {
|
|
85
|
+
case "cookie":
|
|
86
|
+
resolvedValue = resolveCookieValue(property);
|
|
87
|
+
break;
|
|
88
|
+
case "dom":
|
|
89
|
+
resolvedValue = resolveDomValue(property);
|
|
90
|
+
break;
|
|
91
|
+
case "js":
|
|
92
|
+
resolvedValue = resolveJsValue(property);
|
|
93
|
+
break;
|
|
94
|
+
case "localStorage":
|
|
95
|
+
resolvedValue = resolveLocalStorageValue(property);
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
_kubesense_kubesense_browser_core.display.error(`Unsupported remote configuration: "strategy": "${strategy}"`);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const extractor = property.extractor;
|
|
102
|
+
if (extractor !== void 0 && typeof resolvedValue === "string") return extractValue(extractor, resolvedValue);
|
|
103
|
+
return resolvedValue;
|
|
104
|
+
}
|
|
105
|
+
function resolveCookieValue({ name }) {
|
|
106
|
+
const value = (0, _kubesense_kubesense_browser_core.getCookie)(name);
|
|
107
|
+
metrics.increment("cookie", value !== void 0 ? "success" : "missing");
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
function resolveLocalStorageValue({ key }) {
|
|
111
|
+
let value;
|
|
112
|
+
try {
|
|
113
|
+
value = localStorage.getItem(key);
|
|
114
|
+
} catch {
|
|
115
|
+
metrics.increment("localStorage", "failure");
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
metrics.increment("localStorage", value !== null ? "success" : "missing");
|
|
119
|
+
return value ?? void 0;
|
|
120
|
+
}
|
|
121
|
+
function resolveDomValue({ selector, attribute }) {
|
|
122
|
+
let element;
|
|
123
|
+
try {
|
|
124
|
+
element = document.querySelector(selector);
|
|
125
|
+
} catch {
|
|
126
|
+
_kubesense_kubesense_browser_core.display.error(`Invalid selector in the remote configuration: '${selector}'`);
|
|
127
|
+
metrics.increment("dom", "failure");
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (!element) {
|
|
131
|
+
metrics.increment("dom", "missing");
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (isForbidden(element, attribute)) {
|
|
135
|
+
_kubesense_kubesense_browser_core.display.error(`Forbidden element selected by the remote configuration: '${selector}'`);
|
|
136
|
+
metrics.increment("dom", "failure");
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const domValue = attribute !== void 0 ? element.getAttribute(attribute) : element.textContent;
|
|
140
|
+
if (domValue === null) {
|
|
141
|
+
metrics.increment("dom", "missing");
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
metrics.increment("dom", "success");
|
|
145
|
+
return domValue;
|
|
146
|
+
}
|
|
147
|
+
function isForbidden(element, attribute) {
|
|
148
|
+
return element.getAttribute("type") === "password" && attribute === "value";
|
|
149
|
+
}
|
|
150
|
+
function resolveJsValue({ path }) {
|
|
151
|
+
let current = window;
|
|
152
|
+
const pathParts = require_jsonPathParser.parseJsonPath(path);
|
|
153
|
+
if (pathParts.length === 0) {
|
|
154
|
+
_kubesense_kubesense_browser_core.display.error(`Invalid JSON path in the remote configuration: '${path}'`);
|
|
155
|
+
metrics.increment("js", "failure");
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
for (const pathPart of pathParts) {
|
|
159
|
+
if (!(pathPart in current)) {
|
|
160
|
+
metrics.increment("js", "missing");
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
current = current[pathPart];
|
|
165
|
+
} catch (e) {
|
|
166
|
+
_kubesense_kubesense_browser_core.display.error(`Error accessing: '${path}'`, e);
|
|
167
|
+
metrics.increment("js", "failure");
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
metrics.increment("js", "success");
|
|
172
|
+
return current;
|
|
173
|
+
}
|
|
169
174
|
}
|
|
170
175
|
function initMetrics() {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
metrics[metricName][type] = metrics[metricName][type] + 1;
|
|
182
|
-
},
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function isObject(property) {
|
|
186
|
-
return typeof property === 'object' && property !== null;
|
|
176
|
+
const metrics = { fetch: {} };
|
|
177
|
+
return {
|
|
178
|
+
get: () => metrics,
|
|
179
|
+
increment: (metricName, type) => {
|
|
180
|
+
if (!metrics[metricName]) metrics[metricName] = {};
|
|
181
|
+
if (!metrics[metricName][type]) metrics[metricName][type] = 0;
|
|
182
|
+
metrics[metricName][type] = metrics[metricName][type] + 1;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
187
185
|
}
|
|
188
186
|
function isSerializedOption(value) {
|
|
189
|
-
|
|
187
|
+
return "rcSerializedType" in value;
|
|
190
188
|
}
|
|
191
189
|
function resolveRegex(pattern) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
190
|
+
try {
|
|
191
|
+
return new RegExp(pattern);
|
|
192
|
+
} catch {
|
|
193
|
+
_kubesense_kubesense_browser_core.display.error(`Invalid regex in the remote configuration: '${pattern}'`);
|
|
194
|
+
}
|
|
198
195
|
}
|
|
199
196
|
function extractValue(extractor, candidate) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
197
|
+
const resolvedExtractor = resolveRegex(extractor.value);
|
|
198
|
+
if (resolvedExtractor === void 0) return;
|
|
199
|
+
return require_extractRegexMatch.extractRegexMatch(candidate, resolvedExtractor);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Reads the CDN publish time. `Last-Modified` is a CORS-safelisted response header, so it is
|
|
203
|
+
* readable cross-origin without the CDN having to expose it explicitly. It carries an HTTP-date,
|
|
204
|
+
* so the value is only accurate to the second.
|
|
205
|
+
*/
|
|
206
|
+
function parseLastModified(response) {
|
|
207
|
+
const header = response.headers?.get("last-modified");
|
|
208
|
+
if (!header) return;
|
|
209
|
+
const timestamp = new Date(header).getTime();
|
|
210
|
+
return isNaN(timestamp) ? void 0 : timestamp;
|
|
210
211
|
}
|
|
211
212
|
async function fetchRemoteConfiguration(configuration) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
};
|
|
213
|
+
let response;
|
|
214
|
+
try {
|
|
215
|
+
response = await (0, _kubesense_kubesense_browser_core.fetch)(buildEndpoint(configuration));
|
|
216
|
+
} catch {
|
|
217
|
+
response = void 0;
|
|
218
|
+
}
|
|
219
|
+
if (!response?.ok) return {
|
|
220
|
+
ok: false,
|
|
221
|
+
error: /* @__PURE__ */ new Error("Error fetching the remote configuration.")
|
|
222
|
+
};
|
|
223
|
+
const remoteConfiguration = await response.json();
|
|
224
|
+
if (remoteConfiguration.rum || remoteConfiguration.profiling) return {
|
|
225
|
+
ok: true,
|
|
226
|
+
value: remoteConfiguration,
|
|
227
|
+
lastModified: parseLastModified(response)
|
|
228
|
+
};
|
|
229
|
+
return {
|
|
230
|
+
ok: false,
|
|
231
|
+
error: /* @__PURE__ */ new Error("No remote configuration for RUM.")
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function getRemoteConfigurationId(configuration) {
|
|
235
|
+
return configuration.remoteConfiguration?.id ?? configuration.remoteConfigurationId;
|
|
236
236
|
}
|
|
237
237
|
function buildEndpoint(configuration) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
if (configuration.remoteConfigurationProxy) return configuration.remoteConfigurationProxy;
|
|
239
|
+
const id = getRemoteConfigurationId(configuration);
|
|
240
|
+
return (0, _kubesense_kubesense_js_core_transport.buildEndpointUrl)({
|
|
241
|
+
kubesenseRumEndpoint: configuration.kubesenseRumEndpoint,
|
|
242
|
+
path: `/${REMOTE_CONFIGURATION_VERSION}/${encodeURIComponent(id)}.json`,
|
|
243
|
+
subdomain: "sdk-configuration"
|
|
244
|
+
});
|
|
242
245
|
}
|
|
246
|
+
function doBackgroundCacheSync(initConfiguration, cache, metrics) {
|
|
247
|
+
fetchRemoteConfiguration(initConfiguration).then((fetchResult) => {
|
|
248
|
+
if (!fetchResult.ok) {
|
|
249
|
+
metrics.increment("fetch", "failure");
|
|
250
|
+
_kubesense_kubesense_browser_core.display.error(fetchResult.error);
|
|
251
|
+
} else {
|
|
252
|
+
metrics.increment("fetch", "success");
|
|
253
|
+
cache.write(fetchResult.value, fetchResult.lastModified);
|
|
254
|
+
}
|
|
255
|
+
}).catch(_kubesense_kubesense_js_core_monitor.monitorError).finally(() => {
|
|
256
|
+
(0, _kubesense_kubesense_browser_core.addTelemetryMetrics)(_kubesense_kubesense_browser_core.TelemetryMetrics.REMOTE_CONFIGURATION_METRIC_NAME, { metrics: metrics.get() });
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Returns `undefined` when RUM must not start, which only happens with `required: true` and no
|
|
261
|
+
* usable cache entry.
|
|
262
|
+
*/
|
|
263
|
+
function getRemoteConfiguration(initConfiguration, supportedContextManagers) {
|
|
264
|
+
const configurationCache = require_remoteConfigurationCache.createConfigurationCache({ remoteConfigurationId: getRemoteConfigurationId(initConfiguration) });
|
|
265
|
+
const metrics = initMetrics();
|
|
266
|
+
const cacheResult = configurationCache.read();
|
|
267
|
+
metrics.increment("cache", require_remoteConfigurationCache.CACHE_STATUS_TO_METRIC_MAP[cacheResult.status]);
|
|
268
|
+
doBackgroundCacheSync(initConfiguration, configurationCache, metrics);
|
|
269
|
+
if (cacheResult.status === "hit") return {
|
|
270
|
+
metadata: configurationCache.stampFirstApplied(cacheResult),
|
|
271
|
+
initConfiguration: applyRemoteConfiguration(initConfiguration, cacheResult.config, supportedContextManagers, metrics)
|
|
272
|
+
};
|
|
273
|
+
if (initConfiguration.remoteConfiguration?.required) return;
|
|
274
|
+
return { initConfiguration };
|
|
275
|
+
}
|
|
276
|
+
//#endregion
|
|
277
|
+
exports.applyRemoteConfiguration = applyRemoteConfiguration;
|
|
278
|
+
exports.buildEndpoint = buildEndpoint;
|
|
279
|
+
exports.fetchAndApplyRemoteConfiguration = fetchAndApplyRemoteConfiguration;
|
|
280
|
+
exports.fetchRemoteConfiguration = fetchRemoteConfiguration;
|
|
281
|
+
exports.getRemoteConfiguration = getRemoteConfiguration;
|
|
282
|
+
exports.getRemoteConfigurationId = getRemoteConfigurationId;
|
|
283
|
+
exports.initMetrics = initMetrics;
|
|
284
|
+
|
|
243
285
|
//# sourceMappingURL=remoteConfiguration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteConfiguration.js","sourceRoot":"","sources":["../../../src/domain/configuration/remoteConfiguration.ts"],"names":[],"mappings":";;AAuDA,4EAsBC;AAED,4DA8IC;AAED,kCAcC;AAiCD,4DA0BC;AAED,sCAKC;AA9SD,8EAO0C;AAG1C,qDAAgD;AAIhD,MAAM,4BAA4B,GAAG,IAAI,CAAA;AACzC,MAAM,gBAAgB,GAAsC;IAC1D,eAAe;IACf,SAAS;IACT,KAAK;IACL,SA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Q,CAAC,EAAE,EAAE,CAAC;QAC9B,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,IAAI,KAAK,CAAC,0CAA0C,CAAC;SAC7D,CAAA;IACH,CAAC;IACD,MAAM,mBAAmB,GAAwB,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IACtE,IAAI,mBAAmB,CAAC,GAAG,EAAE,CAAC;QAC5B,OAAO;YACL,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,mBAAmB,CAAC,GAAG;SAC/B,CAAA;IACH,CAAC;IACD,OAAO;QACL,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,IAAI,KAAK,CAAC,kCAAkC,CAAC;KACrD,CAAA;AACH,CAAC;AAED,SAAgB,aAAa,CAAC,aAAmC;IAC/D,IAAI,aAAa,CAAC,wBAAwB,EAAE,CAAC;QAC3C,OAAO,aAAa,CAAC,wBAAwB,CAAA;IAC/C,CAAC;IACD,OAAO,6BAA6B,IAAA,0CAAiB,EAAC,KAAK,EAAE,aAAa,CAAC,IAAI,4BAA4B,IAAI,kBAAkB,CAAC,aAAa,CAAC,qBAAsB,CAAC,OAAO,CAAA;AAChL,CAAC"}
|
|
1
|
+
{"version":3,"file":"remoteConfiguration.js","names":["TelemetryMetrics","isIndexableObject","mapValues","getCookie","parseJsonPath","extractRegexMatch","fetch","buildEndpointUrl","monitorError","createConfigurationCache","CACHE_STATUS_TO_METRIC_MAP"],"sources":["../../../src/domain/configuration/remoteConfiguration.ts"],"sourcesContent":["import type { createContextManager, Context } from '@kubesense/kubesense-browser-core'\nimport {\n display,\n mapValues,\n getCookie,\n addTelemetryMetrics,\n TelemetryMetrics,\n fetch,\n} from '@kubesense/kubesense-browser-core'\nimport { monitorError } from '@kubesense/kubesense-js-core/monitor'\nimport { isIndexableObject } from '@kubesense/kubesense-js-core/util'\nimport { buildEndpointUrl } from '@kubesense/kubesense-js-core/transport'\nimport { extractRegexMatch } from '../extractRegexMatch'\nimport type { RumInitConfiguration } from './configuration'\nimport type { RumSdkConfig, DynamicOption, ContextItem } from './remoteConfiguration.types'\nimport { parseJsonPath } from './jsonPathParser'\nimport type { RemoteConfigurationMetadata } from './remoteConfigurationCache'\nimport { CACHE_STATUS_TO_METRIC_MAP, createConfigurationCache } from './remoteConfigurationCache'\n\nexport type RemoteConfiguration = RumSdkConfig\nexport type RumRemoteConfiguration = Exclude<RemoteConfiguration['rum'], undefined>\nconst REMOTE_CONFIGURATION_VERSION = 'v1'\nconst SUPPORTED_RUM_FIELDS: Array<keyof RumInitConfiguration> = [\n 'applicationId',\n 'service',\n 'env',\n 'version',\n 'sessionSampleRate',\n 'sessionReplaySampleRate',\n 'telemetrySampleRate',\n 'trackAnonymousUser',\n 'trackUserInteractions',\n 'trackResources',\n 'trackLongTasks',\n 'traceContextInjection',\n 'actionNameAttribute',\n 'defaultPrivacyLevel',\n 'enablePrivacyForActionName',\n 'traceSampleRate',\n 'trackSessionAcrossSubdomains',\n 'allowedTracingUrls',\n 'allowedTrackingOrigins',\n]\n\n// type needed for switch on union\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\ntype SerializedRegex = { rcSerializedType: 'regex'; value: string }\ntype SerializedOption = { rcSerializedType: 'string'; value: string } | SerializedRegex | DynamicOption\n\ninterface SupportedContextManagers {\n user: ReturnType<typeof createContextManager>\n context: ReturnType<typeof createContextManager>\n}\n\nexport interface RemoteConfigurationMetrics extends Context {\n fetch: RemoteConfigurationMetricCounters\n cache?: RemoteConfigurationMetricCounters\n cookie?: RemoteConfigurationMetricCounters\n dom?: RemoteConfigurationMetricCounters\n js?: RemoteConfigurationMetricCounters\n localStorage?: RemoteConfigurationMetricCounters\n}\n\ninterface RemoteConfigurationMetricCounters {\n success?: number\n missing?: number\n failure?: number\n [key: string]: number | undefined\n}\n\nexport async function fetchAndApplyRemoteConfiguration(\n initConfiguration: RumInitConfiguration,\n supportedContextManagers: SupportedContextManagers\n) {\n let rumInitConfiguration: RumInitConfiguration | undefined\n const metrics = initMetrics()\n const fetchResult = await fetchRemoteConfiguration(initConfiguration)\n if (!fetchResult.ok) {\n metrics.increment('fetch', 'failure')\n display.error(fetchResult.error)\n } else {\n metrics.increment('fetch', 'success')\n rumInitConfiguration = applyRemoteConfiguration(\n initConfiguration,\n fetchResult.value,\n supportedContextManagers,\n metrics\n )\n }\n // monitor-until: forever\n addTelemetryMetrics(TelemetryMetrics.REMOTE_CONFIGURATION_METRIC_NAME, { metrics: metrics.get() })\n return rumInitConfiguration\n}\n\nexport function applyRemoteConfiguration(\n initConfiguration: RumInitConfiguration,\n remoteConfiguration: RemoteConfiguration,\n supportedContextManagers: SupportedContextManagers,\n metrics: ReturnType<typeof initMetrics>\n): RumInitConfiguration {\n // intents:\n // - explicitly set each supported field to limit risk in case an attacker can create configurations\n // - check the existence in the remote config to avoid clearing a provided init field\n const appliedConfiguration = { ...initConfiguration } as RumInitConfiguration & { [key: string]: unknown }\n if (remoteConfiguration.rum) {\n const rumRemoteConfiguration = remoteConfiguration.rum as RumRemoteConfiguration & { [key: string]: unknown }\n SUPPORTED_RUM_FIELDS.forEach((option: string) => {\n if (option in rumRemoteConfiguration) {\n appliedConfiguration[option] = resolveConfigurationProperty(rumRemoteConfiguration[option])\n }\n })\n ;(Object.keys(supportedContextManagers) as Array<keyof SupportedContextManagers>).forEach((context) => {\n if (rumRemoteConfiguration[context] !== undefined) {\n resolveContextProperty(supportedContextManagers[context], rumRemoteConfiguration[context])\n }\n })\n }\n if (remoteConfiguration.profiling?.sampleRate !== undefined) {\n appliedConfiguration.profilingSampleRate = remoteConfiguration.profiling.sampleRate\n }\n return appliedConfiguration\n\n // share context to access metrics\n\n function resolveConfigurationProperty(property: unknown): unknown {\n if (Array.isArray(property)) {\n return property.map(resolveConfigurationProperty)\n }\n if (isIndexableObject(property)) {\n if (isSerializedOption(property)) {\n const type = property.rcSerializedType\n switch (type) {\n case 'string':\n return property.value\n case 'regex':\n return resolveRegex(property.value)\n case 'dynamic':\n return resolveDynamicOption(property)\n default:\n display.error(`Unsupported remote configuration: \"rcSerializedType\": \"${type as string}\"`)\n return\n }\n }\n return mapValues(property, resolveConfigurationProperty)\n }\n return property\n }\n\n function resolveContextProperty(\n contextManager: ReturnType<typeof createContextManager>,\n contextItems: ContextItem[]\n ) {\n contextItems.forEach(({ key, value }) => {\n contextManager.setContextProperty(key, resolveConfigurationProperty(value))\n })\n }\n\n function resolveDynamicOption(property: DynamicOption) {\n const strategy = property.strategy\n let resolvedValue: unknown\n switch (strategy) {\n case 'cookie':\n resolvedValue = resolveCookieValue(property)\n break\n case 'dom':\n resolvedValue = resolveDomValue(property)\n break\n case 'js':\n resolvedValue = resolveJsValue(property)\n break\n case 'localStorage':\n resolvedValue = resolveLocalStorageValue(property)\n break\n default:\n display.error(`Unsupported remote configuration: \"strategy\": \"${strategy as string}\"`)\n return\n }\n const extractor = property.extractor\n if (extractor !== undefined && typeof resolvedValue === 'string') {\n return extractValue(extractor, resolvedValue)\n }\n return resolvedValue\n }\n\n function resolveCookieValue({ name }: { name: string }) {\n const value = getCookie(name)\n metrics.increment('cookie', value !== undefined ? 'success' : 'missing')\n return value\n }\n\n function resolveLocalStorageValue({ key }: { key: string }) {\n let value: string | null\n try {\n value = localStorage.getItem(key)\n } catch {\n metrics.increment('localStorage', 'failure')\n return\n }\n metrics.increment('localStorage', value !== null ? 'success' : 'missing')\n return value ?? undefined\n }\n\n function resolveDomValue({ selector, attribute }: { selector: string; attribute?: string }) {\n let element: Element | null\n try {\n element = document.querySelector(selector)\n } catch {\n display.error(`Invalid selector in the remote configuration: '${selector}'`)\n metrics.increment('dom', 'failure')\n return\n }\n if (!element) {\n metrics.increment('dom', 'missing')\n return\n }\n if (isForbidden(element, attribute)) {\n display.error(`Forbidden element selected by the remote configuration: '${selector}'`)\n metrics.increment('dom', 'failure')\n return\n }\n const domValue = attribute !== undefined ? element.getAttribute(attribute) : element.textContent\n if (domValue === null) {\n metrics.increment('dom', 'missing')\n return\n }\n metrics.increment('dom', 'success')\n return domValue\n }\n\n function isForbidden(element: Element, attribute: string | undefined) {\n return element.getAttribute('type') === 'password' && attribute === 'value'\n }\n\n function resolveJsValue({ path }: { path: string }): unknown {\n let current = window as unknown as { [key: string]: unknown }\n const pathParts = parseJsonPath(path)\n if (pathParts.length === 0) {\n display.error(`Invalid JSON path in the remote configuration: '${path}'`)\n metrics.increment('js', 'failure')\n return\n }\n for (const pathPart of pathParts) {\n if (!(pathPart in current)) {\n metrics.increment('js', 'missing')\n return\n }\n try {\n current = current[pathPart] as { [key: string]: unknown }\n } catch (e) {\n display.error(`Error accessing: '${path}'`, e)\n metrics.increment('js', 'failure')\n return\n }\n }\n metrics.increment('js', 'success')\n return current\n }\n}\n\nexport function initMetrics() {\n const metrics: RemoteConfigurationMetrics = { fetch: {} }\n return {\n get: () => metrics,\n increment: (\n metricName: 'fetch' | 'cache' | DynamicOption['strategy'],\n type: keyof RemoteConfigurationMetricCounters\n ) => {\n if (!metrics[metricName]) {\n metrics[metricName] = {}\n }\n if (!metrics[metricName][type]) {\n metrics[metricName][type] = 0\n }\n metrics[metricName][type] = metrics[metricName][type] + 1\n },\n }\n}\n\nfunction isSerializedOption(value: object): value is SerializedOption {\n return 'rcSerializedType' in value\n}\n\nfunction resolveRegex(pattern: string): RegExp | undefined {\n try {\n return new RegExp(pattern)\n } catch {\n display.error(`Invalid regex in the remote configuration: '${pattern}'`)\n }\n}\n\nfunction extractValue(extractor: SerializedRegex, candidate: string) {\n const resolvedExtractor = resolveRegex(extractor.value)\n if (resolvedExtractor === undefined) {\n return\n }\n return extractRegexMatch(candidate, resolvedExtractor)\n}\n\ntype FetchRemoteConfigurationResult =\n { ok: true; value: RemoteConfiguration; lastModified?: number } | { ok: false; error: Error }\n\n/**\n * Reads the CDN publish time. `Last-Modified` is a CORS-safelisted response header, so it is\n * readable cross-origin without the CDN having to expose it explicitly. It carries an HTTP-date,\n * so the value is only accurate to the second.\n */\nfunction parseLastModified(response: Response): number | undefined {\n const header = response.headers?.get('last-modified')\n if (!header) {\n return\n }\n const timestamp = new Date(header).getTime()\n\n return isNaN(timestamp) ? undefined : timestamp\n}\n\nexport async function fetchRemoteConfiguration(\n configuration: RumInitConfiguration\n): Promise<FetchRemoteConfigurationResult> {\n let response: Response | undefined\n try {\n response = await fetch(buildEndpoint(configuration))\n } catch {\n response = undefined\n }\n if (!response?.ok) {\n return {\n ok: false,\n error: new Error('Error fetching the remote configuration.'),\n }\n }\n const remoteConfiguration: RemoteConfiguration = await response.json()\n if (remoteConfiguration.rum || remoteConfiguration.profiling) {\n return {\n ok: true,\n value: remoteConfiguration,\n lastModified: parseLastModified(response),\n }\n }\n return {\n ok: false,\n error: new Error('No remote configuration for RUM.'),\n }\n}\n\nexport function getRemoteConfigurationId(configuration: RumInitConfiguration): string | undefined {\n return configuration.remoteConfiguration?.id ?? configuration.remoteConfigurationId\n}\n\nexport function buildEndpoint(configuration: RumInitConfiguration) {\n if (configuration.remoteConfigurationProxy) {\n return configuration.remoteConfigurationProxy\n }\n const id = getRemoteConfigurationId(configuration)!\n return buildEndpointUrl({\n kubesenseRumEndpoint: configuration.kubesenseRumEndpoint,\n path: `/${REMOTE_CONFIGURATION_VERSION}/${encodeURIComponent(id)}.json`,\n subdomain: 'sdk-configuration',\n })\n}\n\nfunction doBackgroundCacheSync(\n initConfiguration: RumInitConfiguration,\n cache: ReturnType<typeof createConfigurationCache>,\n metrics: ReturnType<typeof initMetrics>\n) {\n fetchRemoteConfiguration(initConfiguration)\n .then((fetchResult) => {\n if (!fetchResult.ok) {\n metrics.increment('fetch', 'failure')\n display.error(fetchResult.error)\n } else {\n metrics.increment('fetch', 'success')\n cache.write(fetchResult.value, fetchResult.lastModified)\n }\n })\n .catch(monitorError)\n .finally(() => {\n // monitor-until: forever\n addTelemetryMetrics(TelemetryMetrics.REMOTE_CONFIGURATION_METRIC_NAME, { metrics: metrics.get() })\n })\n}\n\nexport interface ResolvedRemoteConfiguration {\n initConfiguration: RumInitConfiguration\n /** Only set when a cached configuration was applied, and reported on configuration telemetry. */\n metadata?: RemoteConfigurationMetadata\n}\n\n/**\n * Returns `undefined` when RUM must not start, which only happens with `required: true` and no\n * usable cache entry.\n */\nexport function getRemoteConfiguration(\n initConfiguration: RumInitConfiguration,\n supportedContextManagers: SupportedContextManagers\n): ResolvedRemoteConfiguration | undefined {\n const configurationCache = createConfigurationCache({\n remoteConfigurationId: getRemoteConfigurationId(initConfiguration)!,\n })\n const metrics = initMetrics()\n\n const cacheResult = configurationCache.read()\n\n metrics.increment('cache', CACHE_STATUS_TO_METRIC_MAP[cacheResult.status])\n\n doBackgroundCacheSync(initConfiguration, configurationCache, metrics)\n\n if (cacheResult.status === 'hit') {\n return {\n // Stamping is synchronous, so it always lands before the background sync above can write.\n metadata: configurationCache.stampFirstApplied(cacheResult),\n initConfiguration: applyRemoteConfiguration(\n initConfiguration,\n cacheResult.config,\n supportedContextManagers,\n metrics\n ),\n }\n }\n\n if (initConfiguration.remoteConfiguration?.required) {\n return\n }\n\n return { initConfiguration }\n}\n"],"mappings":";;;;;;;;AAqBA,MAAM,+BAA+B;AACrC,MAAM,uBAA0D;CAC9D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AA4BA,eAAsB,iCACpB,mBACA,0BACA;CACA,IAAI;CACJ,MAAM,UAAU,YAAY;CAC5B,MAAM,cAAc,MAAM,yBAAyB,iBAAiB;CACpE,IAAI,CAAC,YAAY,IAAI;EACnB,QAAQ,UAAU,SAAS,SAAS;EACpC,kCAAA,QAAQ,MAAM,YAAY,KAAK;CACjC,OAAO;EACL,QAAQ,UAAU,SAAS,SAAS;EACpC,uBAAuB,yBACrB,mBACA,YAAY,OACZ,0BACA,OACF;CACF;CAEA,CAAA,GAAA,kCAAA,oBAAA,CAAoBA,kCAAAA,iBAAiB,kCAAkC,EAAE,SAAS,QAAQ,IAAI,EAAE,CAAC;CACjG,OAAO;AACT;AAEA,SAAgB,yBACd,mBACA,qBACA,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