@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
package/src/boot/rumPublicApi.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { timeStampNow, clocksNow, timeStampToClocks } from '@kubesense/kubesense-js-core/time'
|
|
2
|
+
import { deepClone } from '@kubesense/kubesense-js-core/util'
|
|
3
|
+
import type { Duration, TimeStamp, RelativeTime } from '@kubesense/kubesense-js-core/time'
|
|
1
4
|
import type {
|
|
2
5
|
Context,
|
|
3
|
-
TimeStamp,
|
|
4
|
-
RelativeTime,
|
|
5
6
|
DeflateWorker,
|
|
6
7
|
DeflateEncoderStreamId,
|
|
7
8
|
DeflateEncoder,
|
|
8
9
|
PublicApi,
|
|
9
|
-
Duration,
|
|
10
10
|
ContextManager,
|
|
11
11
|
TrackingConsent,
|
|
12
12
|
User,
|
|
@@ -14,47 +14,49 @@ import type {
|
|
|
14
14
|
RumInternalContext,
|
|
15
15
|
Telemetry,
|
|
16
16
|
Encoder,
|
|
17
|
+
ResourceType,
|
|
18
|
+
SessionManager,
|
|
17
19
|
} from '@kubesense/kubesense-browser-core'
|
|
18
20
|
import {
|
|
19
21
|
ContextManagerMethod,
|
|
20
22
|
addTelemetryUsage,
|
|
21
|
-
deepClone,
|
|
22
23
|
makePublicApi,
|
|
23
|
-
monitor,
|
|
24
|
-
clocksNow,
|
|
25
|
-
callMonitored,
|
|
26
24
|
createHandlingStack,
|
|
27
25
|
sanitize,
|
|
28
26
|
createIdentityEncoder,
|
|
29
27
|
displayAlreadyInitializedError,
|
|
30
28
|
createTrackingConsentState,
|
|
31
|
-
timeStampToClocks,
|
|
32
29
|
CustomerContextKey,
|
|
33
30
|
defineContextMethod,
|
|
34
31
|
startBufferingData,
|
|
32
|
+
mockable,
|
|
33
|
+
generateUUID,
|
|
34
|
+
display,
|
|
35
35
|
} from '@kubesense/kubesense-browser-core'
|
|
36
|
+
import { monitor, callMonitored } from '@kubesense/kubesense-js-core/monitor'
|
|
36
37
|
|
|
37
38
|
import type { LifeCycle } from '../domain/lifeCycle'
|
|
38
39
|
import type { ViewHistory } from '../domain/contexts/viewHistory'
|
|
39
|
-
import type { RumSessionManager } from '../domain/rumSessionManager'
|
|
40
40
|
import type { ReplayStats } from '../rawRumEvent.types'
|
|
41
41
|
import { ActionType, VitalType } from '../rawRumEvent.types'
|
|
42
|
+
import { DEFAULT_TRACKED_RESOURCE_HEADERS } from '../domain/configuration'
|
|
42
43
|
import type { RumConfiguration, RumInitConfiguration } from '../domain/configuration'
|
|
43
44
|
import type { ViewOptions } from '../domain/view/trackViews'
|
|
44
45
|
import type {
|
|
45
46
|
AddDurationVitalOptions,
|
|
46
|
-
DurationVitalReference,
|
|
47
47
|
DurationVitalOptions,
|
|
48
|
+
OperationOptions,
|
|
48
49
|
FeatureOperationOptions,
|
|
49
50
|
FailureReason,
|
|
50
51
|
} from '../domain/vital/vitalCollection'
|
|
51
|
-
import {
|
|
52
|
-
import { callPluginsMethod } from '../domain/plugins'
|
|
52
|
+
import { callPluginsOnRumStart } from '../domain/plugins'
|
|
53
53
|
import type { Hooks } from '../domain/hooks'
|
|
54
54
|
import type { SdkName } from '../domain/contexts/defaultContext'
|
|
55
|
-
import type {
|
|
55
|
+
import type { ActionOptions } from '../domain/action/trackManualActions'
|
|
56
|
+
import type { ResourceOptions, ResourceStopOptions } from '../domain/resource/trackManualResources'
|
|
56
57
|
import { createPreStartStrategy } from './preStartRum'
|
|
57
|
-
import type {
|
|
58
|
+
import type { StartRumResult } from './startRum'
|
|
59
|
+
import { startRum } from './startRum'
|
|
58
60
|
|
|
59
61
|
export interface StartRecordingOptions {
|
|
60
62
|
force: boolean
|
|
@@ -63,12 +65,16 @@ export interface StartRecordingOptions {
|
|
|
63
65
|
/**
|
|
64
66
|
* Public API for the RUM browser SDK.
|
|
65
67
|
*
|
|
68
|
+
* See [RUM Browser Monitoring Setup](https://docs.kubesense.ai/real_user_monitoring/browser) for further information.
|
|
69
|
+
*
|
|
66
70
|
* @category Main
|
|
67
71
|
*/
|
|
68
72
|
export interface RumPublicApi extends PublicApi {
|
|
69
73
|
/**
|
|
70
74
|
* Init the RUM browser SDK.
|
|
71
75
|
*
|
|
76
|
+
* See [RUM Browser Monitoring Setup](https://docs.kubesense.ai/real_user_monitoring/browser) for further information.
|
|
77
|
+
*
|
|
72
78
|
* @category Init
|
|
73
79
|
* @param initConfiguration - Configuration options of the SDK
|
|
74
80
|
* @example
|
|
@@ -80,14 +86,12 @@ export interface RumPublicApi extends PublicApi {
|
|
|
80
86
|
* // ...
|
|
81
87
|
* })
|
|
82
88
|
* ```
|
|
83
|
-
*
|
|
84
89
|
*/
|
|
85
90
|
init: (initConfiguration: RumInitConfiguration) => void
|
|
86
91
|
|
|
87
92
|
/**
|
|
88
93
|
* Set the tracking consent of the current user.
|
|
89
94
|
*
|
|
90
|
-
*
|
|
91
95
|
* Data will be sent only if it is set to "granted". This value won't be stored by the library
|
|
92
96
|
* across page loads: you will need to call this method or set the appropriate `trackingConsent`
|
|
93
97
|
* field in the init() method at each page load.
|
|
@@ -95,7 +99,8 @@ export interface RumPublicApi extends PublicApi {
|
|
|
95
99
|
* If this method is called before the init() method, the provided value will take precedence
|
|
96
100
|
* over the one provided as initialization parameter.
|
|
97
101
|
*
|
|
98
|
-
*
|
|
102
|
+
* See [User tracking consent](https://docs.kubesense.ai/real_user_monitoring/browser/advanced_configuration/#user-tracking-consent) for further information.
|
|
103
|
+
*
|
|
99
104
|
* @category Privacy
|
|
100
105
|
* @param trackingConsent - The user tracking consent
|
|
101
106
|
*/
|
|
@@ -105,8 +110,10 @@ export interface RumPublicApi extends PublicApi {
|
|
|
105
110
|
* Set View Name.
|
|
106
111
|
*
|
|
107
112
|
* Enable to manually change the name of the current view.
|
|
113
|
+
* See [Override default RUM view names](https://docs.kubesense.ai/real_user_monitoring/browser/advanced_configuration/#override-default-rum-view-names) for further information.
|
|
114
|
+
*
|
|
108
115
|
* @category Context - View
|
|
109
|
-
* @param name
|
|
116
|
+
* @param name - Name of the view
|
|
110
117
|
*/
|
|
111
118
|
setViewName: (name: string) => void
|
|
112
119
|
|
|
@@ -114,14 +121,16 @@ export interface RumPublicApi extends PublicApi {
|
|
|
114
121
|
* Set View Context.
|
|
115
122
|
*
|
|
116
123
|
* Enable to manually set the context of the current view.
|
|
124
|
+
*
|
|
117
125
|
* @category Context - View
|
|
118
|
-
* @param context
|
|
126
|
+
* @param context - Context of the view
|
|
119
127
|
*/
|
|
120
128
|
setViewContext: (context: Context) => void
|
|
121
129
|
/**
|
|
122
130
|
* Set View Context Property.
|
|
123
131
|
*
|
|
124
132
|
* Enable to manually set a property of the context of the current view.
|
|
133
|
+
*
|
|
125
134
|
* @category Context - View
|
|
126
135
|
* @param key - key of the property
|
|
127
136
|
* @param value - value of the property
|
|
@@ -130,40 +139,106 @@ export interface RumPublicApi extends PublicApi {
|
|
|
130
139
|
|
|
131
140
|
/**
|
|
132
141
|
* Get View Context.
|
|
142
|
+
*
|
|
133
143
|
* @category Context - View
|
|
134
|
-
*
|
|
135
144
|
*/
|
|
136
145
|
getViewContext(): Context
|
|
137
146
|
|
|
138
147
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* @category internal - View
|
|
142
|
-
* @param context Global context
|
|
148
|
+
* [Internal API] Get the internal SDK context
|
|
143
149
|
*
|
|
150
|
+
* @internal
|
|
144
151
|
*/
|
|
145
152
|
getInternalContext: (startTime?: number) => RumInternalContext | undefined
|
|
146
153
|
|
|
147
154
|
/**
|
|
148
155
|
* Get the init configuration
|
|
156
|
+
*
|
|
157
|
+
* @category Init
|
|
158
|
+
* @returns RumInitConfiguration | undefined
|
|
149
159
|
*/
|
|
150
160
|
getInitConfiguration: () => RumInitConfiguration | undefined
|
|
151
161
|
|
|
152
162
|
/**
|
|
153
163
|
* Add a custom action, stored in `@action`
|
|
154
|
-
* @category Data Collection
|
|
155
|
-
* @param name Name of the action
|
|
156
|
-
* @param context Context of the action
|
|
157
164
|
*
|
|
165
|
+
* See [Send RUM Custom Actions](https://docs.kubesense.ai/real_user_monitoring/guide/send-rum-custom-actions) for further information.
|
|
166
|
+
*
|
|
167
|
+
* @category Data Collection
|
|
168
|
+
* @param name - Name of the action
|
|
169
|
+
* @param context - Context of the action
|
|
158
170
|
*/
|
|
159
171
|
addAction: (name: string, context?: object) => void
|
|
160
172
|
|
|
161
173
|
/**
|
|
162
|
-
*
|
|
174
|
+
* Start tracking a custom action.
|
|
175
|
+
*
|
|
176
|
+
* Call {@link stopAction} with the same name (and optional `actionKey`) to send a RUM action event
|
|
177
|
+
* with the elapsed duration. Errors and resources triggered between start and stop are associated
|
|
178
|
+
* with the action.
|
|
179
|
+
*
|
|
163
180
|
* @category Data Collection
|
|
164
|
-
* @param
|
|
165
|
-
* @param
|
|
181
|
+
* @param name - Name of the action
|
|
182
|
+
* @param options - Options of the action (@default type: 'custom')
|
|
183
|
+
* @example
|
|
184
|
+
* ```ts
|
|
185
|
+
* kubesenseSdk.startAction('checkout', { context: { cartId: 'abc' } })
|
|
186
|
+
* // ... user completes checkout
|
|
187
|
+
* kubesenseSdk.stopAction('checkout')
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
startAction: (name: string, options?: ActionOptions) => void
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Stop tracking a custom action started with {@link startAction}.
|
|
194
|
+
*
|
|
195
|
+
* Sends a RUM action event with the elapsed duration since the matching start call. Context from
|
|
196
|
+
* start and stop calls is merged into the event.
|
|
166
197
|
*
|
|
198
|
+
* @category Data Collection
|
|
199
|
+
* @param name - Name of the action
|
|
200
|
+
* @param options - Options of the action
|
|
201
|
+
*/
|
|
202
|
+
stopAction: (name: string, options?: ActionOptions) => void
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Start tracking a resource manually.
|
|
206
|
+
*
|
|
207
|
+
* Use this for network activity that the SDK cannot automatically instrument. Call {@link stopResource}
|
|
208
|
+
* with the same URL (and optional `resourceKey`) to send a RUM resource event with the elapsed duration.
|
|
209
|
+
*
|
|
210
|
+
* @category Data Collection
|
|
211
|
+
* @param url - URL of the resource
|
|
212
|
+
* @param options - Options of the resource (@default type: 'other')
|
|
213
|
+
* @example
|
|
214
|
+
* ```ts
|
|
215
|
+
* kubesenseSdk.startResource('https://api.example.com/users', { type: 'fetch', method: 'POST' })
|
|
216
|
+
* // ... perform the request
|
|
217
|
+
* kubesenseSdk.stopResource('https://api.example.com/users', { statusCode: 201 })
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
startResource: (url: string, options?: ResourceOptions) => void
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Stop tracking a resource started with {@link startResource}.
|
|
224
|
+
*
|
|
225
|
+
* Sends a RUM resource event with the elapsed duration since the matching start call. Context from
|
|
226
|
+
* start and stop calls is merged into the event.
|
|
227
|
+
*
|
|
228
|
+
* @category Data Collection
|
|
229
|
+
* @param url - URL of the resource
|
|
230
|
+
* @param options - Options of the resource
|
|
231
|
+
*/
|
|
232
|
+
stopResource: (url: string, options?: ResourceStopOptions) => void
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Add a custom error, stored in `@error`.
|
|
236
|
+
*
|
|
237
|
+
* See [Send RUM Custom Actions](https://docs.kubesense.ai/real_user_monitoring/guide/send-rum-custom-actions) for further information.
|
|
238
|
+
*
|
|
239
|
+
* @category Data Collection
|
|
240
|
+
* @param error - Error. Favor sending a [Javascript Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) to have a stack trace attached to the error event.
|
|
241
|
+
* @param context - Context of the error
|
|
167
242
|
*/
|
|
168
243
|
addError: (error: unknown, context?: object) => void
|
|
169
244
|
|
|
@@ -171,15 +246,25 @@ export interface RumPublicApi extends PublicApi {
|
|
|
171
246
|
* Add a custom timing relative to the start of the current view,
|
|
172
247
|
* stored in `@view.custom_timings.<timing_name>`
|
|
173
248
|
*
|
|
174
|
-
* @category Data Collection
|
|
175
|
-
* @param name Name of the custom timing
|
|
176
|
-
* @param [time] Epoch timestamp of the custom timing (if not set, will use current time)
|
|
177
|
-
*
|
|
178
249
|
* Note: passing a relative time is discouraged since it is actually used as-is but displayed relative to the view start.
|
|
179
250
|
* We currently don't provide a way to retrieve the view start time, so it can be challenging to provide a timing relative to the view start.
|
|
251
|
+
*
|
|
252
|
+
* @category Data Collection
|
|
253
|
+
* @param name - Name of the custom timing
|
|
254
|
+
* @param [time] - Epoch timestamp of the custom timing (if not set, will use current time)
|
|
180
255
|
*/
|
|
181
256
|
addTiming: (name: string, time?: number) => void
|
|
182
257
|
|
|
258
|
+
/**
|
|
259
|
+
* [Experimental] Manually set the current view's loading time.
|
|
260
|
+
*
|
|
261
|
+
* Call this method when the view has finished loading. The loading time is computed as the
|
|
262
|
+
* elapsed time since the view started. Each call replaces any previously set value (last-call-wins).
|
|
263
|
+
*
|
|
264
|
+
* @category Data Collection
|
|
265
|
+
*/
|
|
266
|
+
setViewLoadingTime: () => void
|
|
267
|
+
|
|
183
268
|
/**
|
|
184
269
|
* Set the global context information to all events, stored in `@context`
|
|
185
270
|
* See [Global context](https://docs.kubesense.ai/real_user_monitoring/browser/advanced_configuration/#global-context) for further information.
|
|
@@ -333,7 +418,7 @@ export interface RumPublicApi extends PublicApi {
|
|
|
333
418
|
*
|
|
334
419
|
* Context - @category Data Collection
|
|
335
420
|
*
|
|
336
|
-
* @param nameOrOptions -
|
|
421
|
+
* @param nameOrOptions - The view name, or a {@link ViewOptions} object to configure the view
|
|
337
422
|
*/
|
|
338
423
|
startView(nameOrOptions?: string | ViewOptions): void
|
|
339
424
|
|
|
@@ -398,54 +483,113 @@ export interface RumPublicApi extends PublicApi {
|
|
|
398
483
|
/**
|
|
399
484
|
* Start a custom duration vital.
|
|
400
485
|
*
|
|
401
|
-
* If you plan to have multiple durations for the same vital,
|
|
486
|
+
* If you plan to have multiple durations for the same vital, use the `vitalKey` option to
|
|
487
|
+
* differentiate them. Provide the same key when calling `stopDurationVital`.
|
|
402
488
|
*
|
|
403
489
|
* @category Vital - Duration
|
|
404
490
|
* @param name - Name of the custom vital
|
|
405
|
-
* @param options - Options for the custom vital (context, description)
|
|
406
|
-
* @
|
|
491
|
+
* @param options - Options for the custom vital (vitalKey, context, description)
|
|
492
|
+
* @example
|
|
493
|
+
* ```ts
|
|
494
|
+
* // Simple usage
|
|
495
|
+
* kubesenseSdk.startDurationVital('my-vital')
|
|
496
|
+
* kubesenseSdk.stopDurationVital('my-vital')
|
|
497
|
+
*
|
|
498
|
+
* // Multiple simultaneous vitals with the same name
|
|
499
|
+
* const key = crypto.randomUUID()
|
|
500
|
+
* kubesenseSdk.startDurationVital('my-vital', { vitalKey: key })
|
|
501
|
+
* kubesenseSdk.stopDurationVital('my-vital', { vitalKey: key })
|
|
502
|
+
* ```
|
|
407
503
|
*/
|
|
408
|
-
startDurationVital: (name: string, options?: DurationVitalOptions) =>
|
|
504
|
+
startDurationVital: (name: string, options?: DurationVitalOptions) => void
|
|
409
505
|
|
|
410
506
|
/**
|
|
411
507
|
* Stop a custom duration vital
|
|
412
508
|
*
|
|
413
509
|
* @category Vital - Duration
|
|
414
|
-
* @param
|
|
415
|
-
* @param options - Options for the custom vital (
|
|
510
|
+
* @param name - Name of the custom vital
|
|
511
|
+
* @param options - Options for the custom vital (vitalKey, context, description)
|
|
416
512
|
*/
|
|
417
|
-
stopDurationVital: (
|
|
513
|
+
stopDurationVital: (name: string, options?: DurationVitalOptions) => void
|
|
418
514
|
|
|
419
515
|
/**
|
|
420
|
-
*
|
|
516
|
+
* Start an operation.
|
|
517
|
+
*
|
|
518
|
+
* Call {@link succeedOperation} or {@link failOperation} with the same name (and optional
|
|
519
|
+
* `operationKey`) to send a RUM vital event marking the end of the operation.
|
|
520
|
+
*
|
|
521
|
+
* @category Vital - Operation
|
|
522
|
+
* @param name - Name of the operation
|
|
523
|
+
* @param options - Options for the operation (operationKey, context, description)
|
|
524
|
+
* @example
|
|
525
|
+
* ```ts
|
|
526
|
+
* kubesenseSdk.startOperation('checkout')
|
|
527
|
+
* // ... perform the operation
|
|
528
|
+
* kubesenseSdk.succeedOperation('checkout')
|
|
529
|
+
* ```
|
|
530
|
+
*/
|
|
531
|
+
startOperation: (name: string, options?: OperationOptions) => void
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Mark an operation as successful.
|
|
535
|
+
*
|
|
536
|
+
* Sends a RUM vital event marking the end of the operation started with {@link startOperation}.
|
|
537
|
+
*
|
|
538
|
+
* @category Vital - Operation
|
|
539
|
+
* @param name - Name of the operation
|
|
540
|
+
* @param options - Options for the operation (operationKey, context, description)
|
|
541
|
+
*/
|
|
542
|
+
succeedOperation: (name: string, options?: OperationOptions) => void
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Mark an operation as failed.
|
|
546
|
+
*
|
|
547
|
+
* Sends a RUM vital event marking the end of the operation started with {@link startOperation}.
|
|
548
|
+
*
|
|
549
|
+
* @category Vital - Operation
|
|
550
|
+
* @param name - Name of the operation
|
|
551
|
+
* @param failureReason - Reason for the failure
|
|
552
|
+
* @param options - Options for the operation (operationKey, context, description)
|
|
553
|
+
*/
|
|
554
|
+
failOperation: (name: string, failureReason: FailureReason, options?: OperationOptions) => void
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Start a feature operation.
|
|
421
558
|
*
|
|
422
559
|
* @category Vital - Feature Operation
|
|
423
|
-
* @
|
|
424
|
-
* @param
|
|
425
|
-
* @
|
|
560
|
+
* @deprecated Use {@link startOperation} instead.
|
|
561
|
+
* @param name - Name of the operation
|
|
562
|
+
* @param options - Options for the operation (operationKey, context, description)
|
|
426
563
|
*/
|
|
427
564
|
startFeatureOperation: (name: string, options?: FeatureOperationOptions) => void
|
|
428
565
|
|
|
429
566
|
/**
|
|
430
|
-
*
|
|
567
|
+
* Mark a feature operation as successful.
|
|
431
568
|
*
|
|
432
569
|
* @category Vital - Feature Operation
|
|
433
|
-
* @
|
|
434
|
-
* @param
|
|
435
|
-
* @
|
|
570
|
+
* @deprecated Use {@link succeedOperation} instead.
|
|
571
|
+
* @param name - Name of the operation
|
|
572
|
+
* @param options - Options for the operation (operationKey, context, description)
|
|
436
573
|
*/
|
|
437
574
|
succeedFeatureOperation: (name: string, options?: FeatureOperationOptions) => void
|
|
438
575
|
|
|
439
576
|
/**
|
|
440
|
-
*
|
|
577
|
+
* Mark a feature operation as failed.
|
|
441
578
|
*
|
|
442
579
|
* @category Vital - Feature Operation
|
|
443
|
-
* @
|
|
444
|
-
* @param
|
|
445
|
-
* @param
|
|
446
|
-
* @
|
|
580
|
+
* @deprecated Use {@link failOperation} instead.
|
|
581
|
+
* @param name - Name of the operation
|
|
582
|
+
* @param failureReason - Reason for the failure
|
|
583
|
+
* @param options - Options for the operation (operationKey, context, description)
|
|
584
|
+
*/
|
|
585
|
+
failFeatureOperation: (name: string, failureReason: FailureReason, options?: FeatureOperationOptions) => void
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* List of default headers used by the {@link RumInitConfiguration.trackResourceHeaders | trackResourceHeaders} option.
|
|
589
|
+
*
|
|
590
|
+
* @deprecated You can now omit `name` from a MatchHeader entry to include default headers.
|
|
447
591
|
*/
|
|
448
|
-
|
|
592
|
+
DEFAULT_TRACKED_RESOURCE_HEADERS: typeof DEFAULT_TRACKED_RESOURCE_HEADERS
|
|
449
593
|
}
|
|
450
594
|
|
|
451
595
|
export interface RecorderApi {
|
|
@@ -454,7 +598,7 @@ export interface RecorderApi {
|
|
|
454
598
|
onRumStart: (
|
|
455
599
|
lifeCycle: LifeCycle,
|
|
456
600
|
configuration: RumConfiguration,
|
|
457
|
-
sessionManager:
|
|
601
|
+
sessionManager: SessionManager,
|
|
458
602
|
viewHistory: ViewHistory,
|
|
459
603
|
deflateWorker: DeflateWorker | undefined,
|
|
460
604
|
telemetry: Telemetry
|
|
@@ -470,9 +614,8 @@ export interface ProfilerApi {
|
|
|
470
614
|
lifeCycle: LifeCycle,
|
|
471
615
|
hooks: Hooks,
|
|
472
616
|
configuration: RumConfiguration,
|
|
473
|
-
sessionManager:
|
|
617
|
+
sessionManager: SessionManager,
|
|
474
618
|
viewHistory: ViewHistory,
|
|
475
|
-
longTaskContexts: LongTaskContexts,
|
|
476
619
|
createEncoder: (streamId: DeflateEncoderStreamId) => Encoder
|
|
477
620
|
) => void
|
|
478
621
|
}
|
|
@@ -484,11 +627,7 @@ export interface RumPublicApiOptions {
|
|
|
484
627
|
source: string,
|
|
485
628
|
onInitializationFailure: () => void
|
|
486
629
|
) => DeflateWorker | undefined
|
|
487
|
-
createDeflateEncoder?: (
|
|
488
|
-
configuration: RumConfiguration,
|
|
489
|
-
worker: DeflateWorker,
|
|
490
|
-
streamId: DeflateEncoderStreamId
|
|
491
|
-
) => DeflateEncoder
|
|
630
|
+
createDeflateEncoder?: (worker: DeflateWorker, streamId: DeflateEncoderStreamId) => DeflateEncoder
|
|
492
631
|
sdkName?: SdkName
|
|
493
632
|
}
|
|
494
633
|
|
|
@@ -498,6 +637,7 @@ export interface Strategy {
|
|
|
498
637
|
getInternalContext: StartRumResult['getInternalContext']
|
|
499
638
|
stopSession: StartRumResult['stopSession']
|
|
500
639
|
addTiming: StartRumResult['addTiming']
|
|
640
|
+
setLoadingTime: StartRumResult['setLoadingTime']
|
|
501
641
|
startView: StartRumResult['startView']
|
|
502
642
|
setViewName: StartRumResult['setViewName']
|
|
503
643
|
|
|
@@ -510,6 +650,10 @@ export interface Strategy {
|
|
|
510
650
|
accountContext: ContextManager
|
|
511
651
|
|
|
512
652
|
addAction: StartRumResult['addAction']
|
|
653
|
+
startAction: StartRumResult['startAction']
|
|
654
|
+
stopAction: StartRumResult['stopAction']
|
|
655
|
+
startResource: StartRumResult['startResource']
|
|
656
|
+
stopResource: StartRumResult['stopResource']
|
|
513
657
|
addError: StartRumResult['addError']
|
|
514
658
|
addFeatureFlagEvaluation: StartRumResult['addFeatureFlagEvaluation']
|
|
515
659
|
startDurationVital: StartRumResult['startDurationVital']
|
|
@@ -519,41 +663,39 @@ export interface Strategy {
|
|
|
519
663
|
}
|
|
520
664
|
|
|
521
665
|
export function makeRumPublicApi(
|
|
522
|
-
startRumImpl: StartRum,
|
|
523
666
|
recorderApi: RecorderApi,
|
|
524
667
|
profilerApi: ProfilerApi,
|
|
525
668
|
options: RumPublicApiOptions = {}
|
|
526
669
|
): RumPublicApi {
|
|
527
670
|
const trackingConsentState = createTrackingConsentState()
|
|
528
|
-
const
|
|
529
|
-
const bufferedDataObservable = startBufferingData().observable
|
|
671
|
+
const bufferedData = startBufferingData()
|
|
530
672
|
|
|
531
673
|
let strategy = createPreStartStrategy(
|
|
532
674
|
options,
|
|
533
675
|
trackingConsentState,
|
|
534
|
-
|
|
535
|
-
(configuration, deflateWorker, initialViewOptions) => {
|
|
676
|
+
(configuration, sessionManager, deflateWorker, initialViewOptions, telemetry, hooks) => {
|
|
536
677
|
const createEncoder =
|
|
537
678
|
deflateWorker && options.createDeflateEncoder
|
|
538
|
-
? (streamId: DeflateEncoderStreamId) => options.createDeflateEncoder!(
|
|
679
|
+
? (streamId: DeflateEncoderStreamId) => options.createDeflateEncoder!(deflateWorker, streamId)
|
|
539
680
|
: createIdentityEncoder
|
|
540
681
|
|
|
541
|
-
const startRumResult =
|
|
682
|
+
const startRumResult = mockable(startRum)(
|
|
542
683
|
configuration,
|
|
684
|
+
sessionManager,
|
|
543
685
|
recorderApi,
|
|
544
686
|
profilerApi,
|
|
545
687
|
initialViewOptions,
|
|
546
688
|
createEncoder,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
689
|
+
bufferedData.observable,
|
|
690
|
+
telemetry,
|
|
691
|
+
hooks,
|
|
550
692
|
options.sdkName
|
|
551
693
|
)
|
|
552
694
|
|
|
553
695
|
recorderApi.onRumStart(
|
|
554
696
|
startRumResult.lifeCycle,
|
|
555
697
|
configuration,
|
|
556
|
-
|
|
698
|
+
sessionManager,
|
|
557
699
|
startRumResult.viewHistory,
|
|
558
700
|
deflateWorker,
|
|
559
701
|
startRumResult.telemetry
|
|
@@ -563,17 +705,16 @@ export function makeRumPublicApi(
|
|
|
563
705
|
startRumResult.lifeCycle,
|
|
564
706
|
startRumResult.hooks,
|
|
565
707
|
configuration,
|
|
566
|
-
|
|
708
|
+
sessionManager,
|
|
567
709
|
startRumResult.viewHistory,
|
|
568
|
-
startRumResult.longTaskContexts,
|
|
569
710
|
createEncoder
|
|
570
711
|
)
|
|
571
712
|
|
|
572
713
|
strategy = createPostStartStrategy(strategy, startRumResult)
|
|
573
714
|
|
|
574
|
-
|
|
575
|
-
strategy, // TODO: remove this in the next major release
|
|
715
|
+
callPluginsOnRumStart(configuration.plugins, {
|
|
576
716
|
addEvent: startRumResult.addEvent,
|
|
717
|
+
addError: startRumResult.addError,
|
|
577
718
|
})
|
|
578
719
|
|
|
579
720
|
return startRumResult
|
|
@@ -584,10 +725,37 @@ export function makeRumPublicApi(
|
|
|
584
725
|
const startView: {
|
|
585
726
|
(name?: string): void
|
|
586
727
|
(options: ViewOptions): void
|
|
587
|
-
} =
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
|
|
728
|
+
} = (options?: string | ViewOptions) => {
|
|
729
|
+
const handlingStack = createHandlingStack('view')
|
|
730
|
+
callMonitored(() => {
|
|
731
|
+
const sanitizedOptions = typeof options === 'object' ? options : { name: options }
|
|
732
|
+
strategy.startView({
|
|
733
|
+
...sanitizedOptions,
|
|
734
|
+
name: sanitizeStringOption(sanitizedOptions.name, 'view name'),
|
|
735
|
+
service: sanitizeStringOption(sanitizedOptions.service, 'view service'),
|
|
736
|
+
version: sanitizeStringOption(sanitizedOptions.version, 'view version'),
|
|
737
|
+
handlingStack,
|
|
738
|
+
})
|
|
739
|
+
addTelemetryUsage({ feature: 'start-view' })
|
|
740
|
+
})
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
const startOperation: RumPublicApi['startOperation'] = (name, options) => {
|
|
744
|
+
const handlingStack = createHandlingStack('vital')
|
|
745
|
+
callMonitored(() => {
|
|
746
|
+
addTelemetryUsage({ feature: 'add-operation-step-vital', action_type: 'start' })
|
|
747
|
+
strategy.addOperationStepVital(name, 'start', { ...options, handlingStack })
|
|
748
|
+
})
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
const succeedOperation: RumPublicApi['succeedOperation'] = monitor((name, options) => {
|
|
752
|
+
addTelemetryUsage({ feature: 'add-operation-step-vital', action_type: 'succeed' })
|
|
753
|
+
strategy.addOperationStepVital(name, 'end', options)
|
|
754
|
+
})
|
|
755
|
+
|
|
756
|
+
const failOperation: RumPublicApi['failOperation'] = monitor((name, failureReason, options) => {
|
|
757
|
+
addTelemetryUsage({ feature: 'add-operation-step-vital', action_type: 'fail' })
|
|
758
|
+
strategy.addOperationStepVital(name, 'end', options, failureReason)
|
|
591
759
|
})
|
|
592
760
|
|
|
593
761
|
const rumPublicApi: RumPublicApi = makePublicApi<RumPublicApi>({
|
|
@@ -602,7 +770,7 @@ export function makeRumPublicApi(
|
|
|
602
770
|
}),
|
|
603
771
|
|
|
604
772
|
setViewName: monitor((name: string) => {
|
|
605
|
-
strategy.setViewName(name)
|
|
773
|
+
strategy.setViewName(sanitizeStringOption(name, 'view name')!)
|
|
606
774
|
addTelemetryUsage({ feature: 'set-view-name' })
|
|
607
775
|
}),
|
|
608
776
|
|
|
@@ -640,6 +808,45 @@ export function makeRumPublicApi(
|
|
|
640
808
|
})
|
|
641
809
|
},
|
|
642
810
|
|
|
811
|
+
startAction: monitor((name, options) => {
|
|
812
|
+
addTelemetryUsage({ feature: 'start-action' })
|
|
813
|
+
strategy.startAction(sanitize(name)!, {
|
|
814
|
+
type: sanitize(options?.type) as ActionType | undefined,
|
|
815
|
+
context: sanitize(options?.context) as Context,
|
|
816
|
+
actionKey: options?.actionKey,
|
|
817
|
+
})
|
|
818
|
+
}),
|
|
819
|
+
|
|
820
|
+
stopAction: monitor((name, options) => {
|
|
821
|
+
addTelemetryUsage({ feature: 'stop-action' })
|
|
822
|
+
strategy.stopAction(sanitize(name)!, {
|
|
823
|
+
type: sanitize(options?.type) as ActionType | undefined,
|
|
824
|
+
context: sanitize(options?.context) as Context,
|
|
825
|
+
actionKey: options?.actionKey,
|
|
826
|
+
})
|
|
827
|
+
}),
|
|
828
|
+
|
|
829
|
+
startResource: monitor((url, options) => {
|
|
830
|
+
addTelemetryUsage({ feature: 'start-resource' })
|
|
831
|
+
strategy.startResource(sanitize(url)!, {
|
|
832
|
+
type: sanitize(options?.type) as ResourceType | undefined,
|
|
833
|
+
method: sanitize(options?.method) as string | undefined,
|
|
834
|
+
context: sanitize(options?.context) as Context,
|
|
835
|
+
resourceKey: options?.resourceKey,
|
|
836
|
+
})
|
|
837
|
+
}),
|
|
838
|
+
|
|
839
|
+
stopResource: monitor((url, options) => {
|
|
840
|
+
addTelemetryUsage({ feature: 'stop-resource' })
|
|
841
|
+
strategy.stopResource(sanitize(url)!, {
|
|
842
|
+
type: sanitize(options?.type) as ResourceType | undefined,
|
|
843
|
+
statusCode: options?.statusCode,
|
|
844
|
+
size: options?.size,
|
|
845
|
+
context: sanitize(options?.context) as Context,
|
|
846
|
+
resourceKey: options?.resourceKey,
|
|
847
|
+
})
|
|
848
|
+
}),
|
|
849
|
+
|
|
643
850
|
addError: (error, context) => {
|
|
644
851
|
const handlingStack = createHandlingStack('error')
|
|
645
852
|
callMonitored(() => {
|
|
@@ -658,6 +865,14 @@ export function makeRumPublicApi(
|
|
|
658
865
|
strategy.addTiming(sanitize(name)!, time as RelativeTime | TimeStamp | undefined)
|
|
659
866
|
}),
|
|
660
867
|
|
|
868
|
+
setViewLoadingTime: monitor(() => {
|
|
869
|
+
const callTimestamp = timeStampNow()
|
|
870
|
+
strategy.setLoadingTime(callTimestamp)
|
|
871
|
+
addTelemetryUsage({
|
|
872
|
+
feature: 'addViewLoadingTime',
|
|
873
|
+
})
|
|
874
|
+
}),
|
|
875
|
+
|
|
661
876
|
setGlobalContext: defineContextMethod(
|
|
662
877
|
getStrategy,
|
|
663
878
|
CustomerContextKey.globalContext,
|
|
@@ -767,64 +982,88 @@ export function makeRumPublicApi(
|
|
|
767
982
|
|
|
768
983
|
startSessionReplayRecording: monitor((options?: StartRecordingOptions) => {
|
|
769
984
|
recorderApi.start(options)
|
|
770
|
-
addTelemetryUsage({ feature: 'start-session-replay-recording', force: options
|
|
985
|
+
addTelemetryUsage({ feature: 'start-session-replay-recording', force: options?.force })
|
|
771
986
|
}),
|
|
772
987
|
|
|
773
988
|
stopSessionReplayRecording: monitor(() => recorderApi.stop()),
|
|
774
989
|
|
|
775
|
-
addDurationVital:
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
990
|
+
addDurationVital: (name, options) => {
|
|
991
|
+
const handlingStack = createHandlingStack('vital')
|
|
992
|
+
callMonitored(() => {
|
|
993
|
+
addTelemetryUsage({ feature: 'add-duration-vital' })
|
|
994
|
+
strategy.addDurationVital({
|
|
995
|
+
id: generateUUID(),
|
|
996
|
+
name: sanitize(name)!,
|
|
997
|
+
type: VitalType.DURATION,
|
|
998
|
+
startClocks: timeStampToClocks(options.startTime as TimeStamp),
|
|
999
|
+
duration: options.duration as Duration,
|
|
1000
|
+
context: sanitize(options?.context) as Context,
|
|
1001
|
+
description: sanitize(options?.description) as string | undefined,
|
|
1002
|
+
handlingStack,
|
|
1003
|
+
})
|
|
784
1004
|
})
|
|
785
|
-
}
|
|
1005
|
+
},
|
|
786
1006
|
|
|
787
|
-
startDurationVital:
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
1007
|
+
startDurationVital: (name, options) => {
|
|
1008
|
+
const handlingStack = createHandlingStack('vital')
|
|
1009
|
+
callMonitored(() => {
|
|
1010
|
+
addTelemetryUsage({ feature: 'start-duration-vital' })
|
|
1011
|
+
strategy.startDurationVital(sanitize(name)!, {
|
|
1012
|
+
vitalKey: options?.vitalKey,
|
|
1013
|
+
context: sanitize(options?.context) as Context,
|
|
1014
|
+
description: sanitize(options?.description) as string | undefined,
|
|
1015
|
+
handlingStack,
|
|
1016
|
+
})
|
|
792
1017
|
})
|
|
793
|
-
}
|
|
1018
|
+
},
|
|
794
1019
|
|
|
795
|
-
stopDurationVital: monitor((
|
|
1020
|
+
stopDurationVital: monitor((name, options) => {
|
|
796
1021
|
addTelemetryUsage({ feature: 'stop-duration-vital' })
|
|
797
|
-
strategy.stopDurationVital(
|
|
798
|
-
|
|
799
|
-
|
|
1022
|
+
strategy.stopDurationVital(sanitize(name)!, {
|
|
1023
|
+
vitalKey: options?.vitalKey,
|
|
1024
|
+
context: sanitize(options?.context) as Context,
|
|
1025
|
+
description: sanitize(options?.description) as string | undefined,
|
|
800
1026
|
})
|
|
801
1027
|
}),
|
|
802
1028
|
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
}),
|
|
1029
|
+
startOperation,
|
|
1030
|
+
succeedOperation,
|
|
1031
|
+
failOperation,
|
|
807
1032
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
1033
|
+
// Deprecated aliases — kept for backwards compatibility, forward to the renamed APIs above.
|
|
1034
|
+
// TODO: remove in the next major version (RUM-16921).
|
|
1035
|
+
startFeatureOperation: startOperation,
|
|
1036
|
+
succeedFeatureOperation: succeedOperation,
|
|
1037
|
+
failFeatureOperation: failOperation,
|
|
812
1038
|
|
|
813
|
-
|
|
814
|
-
addTelemetryUsage({ feature: 'add-operation-step-vital', action_type: 'fail' })
|
|
815
|
-
strategy.addOperationStepVital(name, 'end', options, failureReason)
|
|
816
|
-
}),
|
|
1039
|
+
DEFAULT_TRACKED_RESOURCE_HEADERS,
|
|
817
1040
|
})
|
|
818
1041
|
|
|
819
1042
|
return rumPublicApi
|
|
820
1043
|
}
|
|
821
1044
|
|
|
1045
|
+
function sanitizeStringOption(value: unknown, label: string): string | undefined {
|
|
1046
|
+
if (value === undefined) {
|
|
1047
|
+
return undefined
|
|
1048
|
+
}
|
|
1049
|
+
if (typeof value !== 'string') {
|
|
1050
|
+
display.warn(`Invalid ${label} provided (expected a string, got ${typeof value}). Ignoring.`)
|
|
1051
|
+
return undefined
|
|
1052
|
+
}
|
|
1053
|
+
return sanitize(value)
|
|
1054
|
+
}
|
|
1055
|
+
|
|
822
1056
|
function createPostStartStrategy(preStartStrategy: Strategy, startRumResult: StartRumResult): Strategy {
|
|
823
1057
|
return {
|
|
1058
|
+
...preStartStrategy,
|
|
824
1059
|
init: (initConfiguration: RumInitConfiguration) => {
|
|
825
1060
|
displayAlreadyInitializedError('KUBESENSE_SDK', initConfiguration)
|
|
826
1061
|
},
|
|
827
|
-
|
|
828
|
-
|
|
1062
|
+
getInternalContext: startRumResult.getInternalContext,
|
|
1063
|
+
stopSession: startRumResult.stopSession,
|
|
1064
|
+
getViewContext: startRumResult.getViewContext,
|
|
1065
|
+
globalContext: startRumResult.globalContext,
|
|
1066
|
+
userContext: startRumResult.userContext,
|
|
1067
|
+
accountContext: startRumResult.accountContext,
|
|
829
1068
|
}
|
|
830
1069
|
}
|