@cloudcare/browser-rum 3.0.29 → 3.1.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/bundle/dataflux-rum.js +1 -1
- package/cjs/boot/buildEnv.js +3 -2
- package/cjs/boot/buildEnv.js.map +1 -0
- package/cjs/boot/recorderApi.js +30 -46
- package/cjs/boot/recorderApi.js.map +1 -0
- package/cjs/boot/rum.entry.js +2 -7
- package/cjs/boot/rum.entry.js.map +1 -0
- package/cjs/boot/rum.js +40 -43
- package/cjs/boot/rum.js.map +1 -0
- package/cjs/boot/rumPublicApi.js +3 -49
- package/cjs/boot/rumPublicApi.js.map +1 -0
- package/cjs/boot/startRecording.js +7 -11
- package/cjs/boot/startRecording.js.map +1 -0
- package/cjs/constants.js +8 -6
- package/cjs/constants.js.map +1 -0
- package/cjs/domain/assembly.js +8 -20
- package/cjs/domain/assembly.js.map +1 -0
- package/cjs/domain/configuration.js +15 -52
- package/cjs/domain/configuration.js.map +1 -0
- package/cjs/domain/contexts/commonContext.js +2 -2
- package/cjs/domain/contexts/commonContext.js.map +1 -0
- package/cjs/domain/contexts/displayContext.js +28 -0
- package/cjs/domain/contexts/displayContext.js.map +1 -0
- package/cjs/domain/contexts/foregroundContexts.js +4 -29
- package/cjs/domain/contexts/foregroundContexts.js.map +1 -0
- package/cjs/domain/contexts/internalContext.js +5 -4
- package/cjs/domain/contexts/internalContext.js.map +1 -0
- package/cjs/domain/contexts/pageStateHistory.js +105 -0
- package/cjs/domain/contexts/pageStateHistory.js.map +1 -0
- package/cjs/domain/contexts/urlContexts.js +3 -9
- package/cjs/domain/contexts/urlContexts.js.map +1 -0
- package/cjs/domain/contexts/viewContexts.js +2 -6
- package/cjs/domain/contexts/viewContexts.js.map +1 -0
- package/cjs/domain/domMutationCollection.js +6 -10
- package/cjs/domain/domMutationCollection.js.map +1 -0
- package/cjs/domain/initViewportObservable.js +4 -11
- package/cjs/domain/initViewportObservable.js.map +1 -0
- package/cjs/domain/locationChangeObservable.js +2 -11
- package/cjs/domain/locationChangeObservable.js.map +1 -0
- package/cjs/domain/performanceCollection.js +11 -39
- package/cjs/domain/performanceCollection.js.map +1 -0
- package/cjs/domain/replay/deflate/deflateEncoder.js +82 -0
- package/cjs/domain/replay/deflate/deflateEncoder.js.map +1 -0
- package/cjs/domain/replay/deflate/deflateWorker.js +142 -0
- package/cjs/domain/replay/deflate/deflateWorker.js.map +1 -0
- package/cjs/domain/replay/deflate/index.js +44 -0
- package/cjs/domain/replay/deflate/index.js.map +1 -0
- package/cjs/domain/replay/record/elementsScrollPositions.js +2 -3
- package/cjs/domain/replay/record/elementsScrollPositions.js.map +1 -0
- package/cjs/domain/replay/record/index.js +2 -4
- package/cjs/domain/replay/record/index.js.map +1 -0
- package/cjs/domain/replay/record/mutationBatch.js +4 -11
- package/cjs/domain/replay/record/mutationBatch.js.map +1 -0
- package/cjs/domain/replay/record/mutationObserver.js +27 -86
- package/cjs/domain/replay/record/mutationObserver.js.map +1 -0
- package/cjs/domain/replay/record/observers.js +15 -89
- package/cjs/domain/replay/record/observers.js.map +1 -0
- package/cjs/domain/replay/record/privacy.js +57 -75
- package/cjs/domain/replay/record/privacy.js.map +1 -0
- package/cjs/domain/replay/record/record.js +6 -29
- package/cjs/domain/replay/record/record.js.map +1 -0
- package/cjs/domain/replay/record/serializationUtils.js +8 -68
- package/cjs/domain/replay/record/serializationUtils.js.map +1 -0
- package/cjs/domain/replay/record/serialize.js +43 -118
- package/cjs/domain/replay/record/serialize.js.map +1 -0
- package/cjs/domain/replay/record/shadowRootsController.js +4 -11
- package/cjs/domain/replay/record/shadowRootsController.js.map +1 -0
- package/cjs/domain/replay/record/utils.js +4 -12
- package/cjs/domain/replay/record/utils.js.map +1 -0
- package/cjs/domain/replay/record/viewports.js +4 -42
- package/cjs/domain/replay/record/viewports.js.map +1 -0
- package/cjs/domain/replay/replayStats.js +2 -14
- package/cjs/domain/replay/replayStats.js.map +1 -0
- package/cjs/domain/replay/segmentCollection/buildReplayPayload.js +4 -9
- package/cjs/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -0
- package/cjs/domain/replay/segmentCollection/index.js +1 -9
- package/cjs/domain/replay/segmentCollection/index.js.map +1 -0
- package/cjs/domain/replay/segmentCollection/segment.js +23 -87
- package/cjs/domain/replay/segmentCollection/segment.js.map +1 -0
- package/cjs/domain/replay/segmentCollection/segmentCollection.js +41 -64
- package/cjs/domain/replay/segmentCollection/segmentCollection.js.map +1 -0
- package/cjs/domain/requestCollection.js +2 -17
- package/cjs/domain/requestCollection.js.map +1 -0
- package/cjs/domain/rumEventsCollection/actions/actionCollection.js +12 -22
- package/cjs/domain/rumEventsCollection/actions/actionCollection.js.map +1 -0
- package/cjs/domain/rumEventsCollection/actions/clickChain.js +3 -14
- package/cjs/domain/rumEventsCollection/actions/clickChain.js.map +1 -0
- package/cjs/domain/rumEventsCollection/actions/computeFrustration.js +12 -20
- package/cjs/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -0
- package/cjs/domain/rumEventsCollection/actions/getActionNameFromElement.js +22 -53
- package/cjs/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -0
- package/cjs/domain/rumEventsCollection/actions/getSelectorsFromElement.js +13 -45
- package/cjs/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -0
- package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js +4 -6
- package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -0
- package/cjs/domain/rumEventsCollection/actions/trackClickActions.js +15 -45
- package/cjs/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -0
- package/cjs/domain/rumEventsCollection/error/errorCollection.js +13 -23
- package/cjs/domain/rumEventsCollection/error/errorCollection.js.map +1 -0
- package/cjs/domain/rumEventsCollection/error/trackConsoleError.js +2 -3
- package/cjs/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -0
- package/cjs/domain/rumEventsCollection/error/trackReportError.js +4 -5
- package/cjs/domain/rumEventsCollection/error/trackReportError.js.map +1 -0
- package/cjs/domain/rumEventsCollection/longTask/longTaskCollection.js +2 -7
- package/cjs/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -0
- package/cjs/domain/rumEventsCollection/resource/matchRequestTiming.js +2 -13
- package/cjs/domain/rumEventsCollection/resource/matchRequestTiming.js.map +1 -0
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js +2 -18
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -0
- package/cjs/domain/rumEventsCollection/resource/resourceUtils.js +58 -69
- package/cjs/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/interactionCountPolyfill.js +55 -0
- package/cjs/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackCommonViewMetrics.js +62 -0
- package/cjs/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +74 -0
- package/cjs/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +26 -0
- package/cjs/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackFirstHidden.js +2 -8
- package/cjs/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackFirstInputTimings.js +38 -0
- package/cjs/domain/rumEventsCollection/view/trackFirstInputTimings.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackInitialViewTimings.js +26 -179
- package/cjs/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +120 -0
- package/cjs/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +49 -0
- package/cjs/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackLoadingTime.js +39 -0
- package/cjs/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackNavigationTimings.js +37 -0
- package/cjs/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackScrollMetrics.js +61 -0
- package/cjs/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackViewEventCounts.js +3 -6
- package/cjs/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/trackViews.js +26 -58
- package/cjs/domain/rumEventsCollection/view/trackViews.js.map +1 -0
- package/cjs/domain/rumEventsCollection/view/viewCollection.js +43 -48
- package/cjs/domain/rumEventsCollection/view/viewCollection.js.map +1 -0
- package/cjs/domain/rumSessionManager.js +3 -13
- package/cjs/domain/rumSessionManager.js.map +1 -0
- package/cjs/domain/tracing/ddtraceTracer.js +2 -4
- package/cjs/domain/tracing/ddtraceTracer.js.map +1 -0
- package/cjs/domain/tracing/getDocumentTraceId.js +5 -22
- package/cjs/domain/tracing/getDocumentTraceId.js.map +1 -0
- package/cjs/domain/tracing/jaegerTracer.js +2 -4
- package/cjs/domain/tracing/jaegerTracer.js.map +1 -0
- package/cjs/domain/tracing/skywalkingTracer.js +6 -13
- package/cjs/domain/tracing/skywalkingTracer.js.map +1 -0
- package/cjs/domain/tracing/traceIdentifier.js +2 -7
- package/cjs/domain/tracing/traceIdentifier.js.map +1 -0
- package/cjs/domain/tracing/tracer.js +5 -30
- package/cjs/domain/tracing/tracer.js.map +1 -0
- package/cjs/domain/tracing/w3cTraceParentTracer.js +2 -11
- package/cjs/domain/tracing/w3cTraceParentTracer.js.map +1 -0
- package/cjs/domain/tracing/zipkinMultiTracer.js +4 -6
- package/cjs/domain/tracing/zipkinMultiTracer.js.map +1 -0
- package/cjs/domain/tracing/zipkinSingleTracer.js +2 -4
- package/cjs/domain/tracing/zipkinSingleTracer.js.map +1 -0
- package/cjs/domain/trackEventCounts.js +2 -10
- package/cjs/domain/trackEventCounts.js.map +1 -0
- package/cjs/domain/usr/index.js +2 -7
- package/cjs/domain/usr/index.js.map +1 -0
- package/cjs/domain/waitPageActivityEnd.js +7 -23
- package/cjs/domain/waitPageActivityEnd.js.map +1 -0
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -0
- package/cjs/transport/startRumBatch.js +7 -8
- package/cjs/transport/startRumBatch.js.map +1 -0
- package/cjs/transport/startRumEventBridge.js +2 -3
- package/cjs/transport/startRumEventBridge.js.map +1 -0
- package/cjs/types/index.js +2 -3
- package/cjs/types/index.js.map +1 -0
- package/cjs/types/sessionReplayConstants.js +4 -3
- package/cjs/types/sessionReplayConstants.js.map +1 -0
- package/esm/boot/buildEnv.js +3 -2
- package/esm/boot/buildEnv.js.map +1 -0
- package/esm/boot/recorderApi.js +32 -42
- package/esm/boot/recorderApi.js.map +1 -0
- package/esm/boot/rum.entry.js +2 -1
- package/esm/boot/rum.entry.js.map +1 -0
- package/esm/boot/rum.js +41 -23
- package/esm/boot/rum.js.map +1 -0
- package/esm/boot/rumPublicApi.js +3 -43
- package/esm/boot/rumPublicApi.js.map +1 -0
- package/esm/boot/startRecording.js +8 -7
- package/esm/boot/startRecording.js.map +1 -0
- package/esm/constants.js +8 -4
- package/esm/constants.js.map +1 -0
- package/esm/domain/assembly.js +8 -17
- package/esm/domain/assembly.js.map +1 -0
- package/esm/domain/configuration.js +15 -38
- package/esm/domain/configuration.js.map +1 -0
- package/esm/domain/contexts/commonContext.js +2 -1
- package/esm/domain/contexts/commonContext.js.map +1 -0
- package/esm/domain/contexts/displayContext.js +21 -0
- package/esm/domain/contexts/displayContext.js.map +1 -0
- package/esm/domain/contexts/foregroundContexts.js +6 -25
- package/esm/domain/contexts/foregroundContexts.js.map +1 -0
- package/esm/domain/contexts/internalContext.js +5 -3
- package/esm/domain/contexts/internalContext.js.map +1 -0
- package/esm/domain/contexts/pageStateHistory.js +95 -0
- package/esm/domain/contexts/pageStateHistory.js.map +1 -0
- package/esm/domain/contexts/urlContexts.js +3 -6
- package/esm/domain/contexts/urlContexts.js.map +1 -0
- package/esm/domain/contexts/viewContexts.js +2 -3
- package/esm/domain/contexts/viewContexts.js.map +1 -0
- package/esm/domain/domMutationCollection.js +6 -7
- package/esm/domain/domMutationCollection.js.map +1 -0
- package/esm/domain/initViewportObservable.js +4 -6
- package/esm/domain/initViewportObservable.js.map +1 -0
- package/esm/domain/locationChangeObservable.js +2 -9
- package/esm/domain/locationChangeObservable.js.map +1 -0
- package/esm/domain/performanceCollection.js +11 -35
- package/esm/domain/performanceCollection.js.map +1 -0
- package/esm/domain/replay/deflate/deflateEncoder.js +74 -0
- package/esm/domain/replay/deflate/deflateEncoder.js.map +1 -0
- package/esm/domain/replay/deflate/deflateWorker.js +129 -0
- package/esm/domain/replay/deflate/deflateWorker.js.map +1 -0
- package/esm/domain/replay/deflate/index.js +3 -0
- package/esm/domain/replay/deflate/index.js.map +1 -0
- package/esm/domain/replay/record/elementsScrollPositions.js +2 -2
- package/esm/domain/replay/record/elementsScrollPositions.js.map +1 -0
- package/esm/domain/replay/record/index.js +2 -1
- package/esm/domain/replay/record/index.js.map +1 -0
- package/esm/domain/replay/record/mutationBatch.js +5 -9
- package/esm/domain/replay/record/mutationBatch.js.map +1 -0
- package/esm/domain/replay/record/mutationObserver.js +29 -80
- package/esm/domain/replay/record/mutationObserver.js.map +1 -0
- package/esm/domain/replay/record/observers.js +15 -72
- package/esm/domain/replay/record/observers.js.map +1 -0
- package/esm/domain/replay/record/privacy.js +57 -65
- package/esm/domain/replay/record/privacy.js.map +1 -0
- package/esm/domain/replay/record/record.js +6 -19
- package/esm/domain/replay/record/record.js.map +1 -0
- package/esm/domain/replay/record/serializationUtils.js +8 -46
- package/esm/domain/replay/record/serializationUtils.js.map +1 -0
- package/esm/domain/replay/record/serialize.js +45 -107
- package/esm/domain/replay/record/serialize.js.map +1 -0
- package/esm/domain/replay/record/shadowRootsController.js +4 -6
- package/esm/domain/replay/record/shadowRootsController.js.map +1 -0
- package/esm/domain/replay/record/utils.js +4 -6
- package/esm/domain/replay/record/utils.js.map +1 -0
- package/esm/domain/replay/record/viewports.js +3 -32
- package/esm/domain/replay/record/viewports.js.map +1 -0
- package/esm/domain/replay/replayStats.js +2 -8
- package/esm/domain/replay/replayStats.js.map +1 -0
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js +4 -6
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -0
- package/esm/domain/replay/segmentCollection/index.js +2 -2
- package/esm/domain/replay/segmentCollection/index.js.map +1 -0
- package/esm/domain/replay/segmentCollection/segment.js +21 -77
- package/esm/domain/replay/segmentCollection/segment.js.map +1 -0
- package/esm/domain/replay/segmentCollection/segmentCollection.js +40 -53
- package/esm/domain/replay/segmentCollection/segmentCollection.js.map +1 -0
- package/esm/domain/requestCollection.js +2 -10
- package/esm/domain/requestCollection.js.map +1 -0
- package/esm/domain/rumEventsCollection/actions/actionCollection.js +12 -19
- package/esm/domain/rumEventsCollection/actions/actionCollection.js.map +1 -0
- package/esm/domain/rumEventsCollection/actions/clickChain.js +3 -10
- package/esm/domain/rumEventsCollection/actions/clickChain.js.map +1 -0
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js +12 -14
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -0
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js +22 -50
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -0
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js +12 -40
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -0
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js +4 -4
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -0
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js +18 -37
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -0
- package/esm/domain/rumEventsCollection/error/errorCollection.js +14 -19
- package/esm/domain/rumEventsCollection/error/errorCollection.js.map +1 -0
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js +2 -1
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -0
- package/esm/domain/rumEventsCollection/error/trackReportError.js +4 -3
- package/esm/domain/rumEventsCollection/error/trackReportError.js.map +1 -0
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js +2 -5
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -0
- package/esm/domain/rumEventsCollection/resource/matchRequestTiming.js +3 -11
- package/esm/domain/rumEventsCollection/resource/matchRequestTiming.js.map +1 -0
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js +2 -13
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -0
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js +58 -57
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js +47 -0
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js +56 -0
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +67 -0
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +18 -0
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js +2 -4
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackFirstInputTimings.js +32 -0
- package/esm/domain/rumEventsCollection/view/trackFirstInputTimings.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js +25 -164
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +113 -0
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +41 -0
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js +33 -0
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js +31 -0
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js +53 -0
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js +5 -3
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/trackViews.js +28 -54
- package/esm/domain/rumEventsCollection/view/trackViews.js.map +1 -0
- package/esm/domain/rumEventsCollection/view/viewCollection.js +43 -44
- package/esm/domain/rumEventsCollection/view/viewCollection.js.map +1 -0
- package/esm/domain/rumSessionManager.js +3 -9
- package/esm/domain/rumSessionManager.js.map +1 -0
- package/esm/domain/tracing/ddtraceTracer.js +2 -2
- package/esm/domain/tracing/ddtraceTracer.js.map +1 -0
- package/esm/domain/tracing/getDocumentTraceId.js +5 -15
- package/esm/domain/tracing/getDocumentTraceId.js.map +1 -0
- package/esm/domain/tracing/jaegerTracer.js +3 -2
- package/esm/domain/tracing/jaegerTracer.js.map +1 -0
- package/esm/domain/tracing/skywalkingTracer.js +8 -12
- package/esm/domain/tracing/skywalkingTracer.js.map +1 -0
- package/esm/domain/tracing/traceIdentifier.js +2 -4
- package/esm/domain/tracing/traceIdentifier.js.map +1 -0
- package/esm/domain/tracing/tracer.js +5 -19
- package/esm/domain/tracing/tracer.js.map +1 -0
- package/esm/domain/tracing/w3cTraceParentTracer.js +4 -8
- package/esm/domain/tracing/w3cTraceParentTracer.js.map +1 -0
- package/esm/domain/tracing/zipkinMultiTracer.js +5 -4
- package/esm/domain/tracing/zipkinMultiTracer.js.map +1 -0
- package/esm/domain/tracing/zipkinSingleTracer.js +3 -2
- package/esm/domain/tracing/zipkinSingleTracer.js.map +1 -0
- package/esm/domain/trackEventCounts.js +2 -8
- package/esm/domain/trackEventCounts.js.map +1 -0
- package/esm/domain/usr/index.js +2 -3
- package/esm/domain/usr/index.js.map +1 -0
- package/esm/domain/waitPageActivityEnd.js +9 -19
- package/esm/domain/waitPageActivityEnd.js.map +1 -0
- package/esm/index.js +2 -1
- package/esm/index.js.map +1 -0
- package/esm/transport/startRumBatch.js +7 -6
- package/esm/transport/startRumBatch.js.map +1 -0
- package/esm/transport/startRumEventBridge.js +2 -1
- package/esm/transport/startRumEventBridge.js.map +1 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/sessionReplayConstants.js +5 -3
- package/esm/types/sessionReplayConstants.js.map +1 -0
- package/package.json +6 -5
- package/src/boot/recorderApi.js +43 -32
- package/src/boot/rum.js +45 -10
- package/src/boot/startRecording.js +7 -3
- package/src/domain/assembly.js +5 -2
- package/src/domain/configuration.js +0 -1
- package/src/domain/contexts/displayContext.js +29 -0
- package/src/domain/contexts/internalContext.js +3 -1
- package/src/domain/contexts/pageStateHistory.js +138 -0
- package/src/domain/replay/deflate/deflateEncoder.js +88 -0
- package/src/domain/replay/{segmentCollection/startDeflateWorker.js → deflate/deflateWorker.js} +55 -32
- package/src/domain/replay/deflate/index.js +7 -0
- package/src/domain/replay/record/mutationObserver.js +2 -1
- package/src/domain/replay/record/observers.js +3 -3
- package/src/domain/replay/record/privacy.js +20 -23
- package/src/domain/replay/record/record.js +2 -2
- package/src/domain/replay/record/serializationUtils.js +4 -2
- package/src/domain/replay/record/serialize.js +11 -14
- package/src/domain/replay/record/shadowRootsController.js +0 -1
- package/src/domain/replay/record/viewports.js +0 -26
- package/src/domain/replay/segmentCollection/buildReplayPayload.js +1 -1
- package/src/domain/replay/segmentCollection/index.js +0 -1
- package/src/domain/replay/segmentCollection/segment.js +28 -83
- package/src/domain/replay/segmentCollection/segmentCollection.js +49 -55
- package/src/domain/rumEventsCollection/actions/actionCollection.js +12 -12
- package/src/domain/rumEventsCollection/actions/trackClickActions.js +8 -6
- package/src/domain/rumEventsCollection/error/errorCollection.js +20 -15
- package/src/domain/rumEventsCollection/error/trackReportError.js +22 -16
- package/src/domain/rumEventsCollection/view/interactionCountPolyfill.js +59 -0
- package/src/domain/rumEventsCollection/view/trackCommonViewMetrics.js +87 -0
- package/src/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +73 -0
- package/src/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +23 -0
- package/src/domain/rumEventsCollection/view/trackFirstInputTimings.js +40 -0
- package/src/domain/rumEventsCollection/view/trackInitialViewTimings.js +29 -199
- package/src/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +144 -0
- package/src/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +57 -0
- package/src/domain/rumEventsCollection/view/trackLoadingTime.js +50 -0
- package/src/domain/rumEventsCollection/view/trackNavigationTimings.js +35 -0
- package/src/domain/rumEventsCollection/view/trackScrollMetrics.js +74 -0
- package/src/domain/rumEventsCollection/view/trackViews.js +32 -37
- package/src/domain/rumEventsCollection/view/viewCollection.js +51 -22
- package/src/transport/startRumBatch.js +5 -1
- package/cjs/domain/replay/segmentCollection/startDeflateWorker.js +0 -145
- package/cjs/domain/rumEventsCollection/view/trackViewMetrics.js +0 -156
- package/esm/domain/replay/segmentCollection/startDeflateWorker.js +0 -128
- package/esm/domain/rumEventsCollection/view/trackViewMetrics.js +0 -146
- package/src/domain/rumEventsCollection/view/trackViewMetrics.js +0 -176
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.convertMouseEventToLayoutCoordinates = void 0;
|
|
7
|
-
exports.getScrollX = getScrollX;
|
|
8
|
-
exports.getScrollY = getScrollY;
|
|
9
|
-
exports.getVisualViewport = void 0;
|
|
10
|
-
|
|
6
|
+
exports.getVisualViewport = exports.convertMouseEventToLayoutCoordinates = void 0;
|
|
11
7
|
/**
|
|
12
8
|
* Browsers have not standardized various dimension properties. Mobile devices typically report
|
|
13
9
|
* dimensions in reference to the visual viewport, while desktop uses the layout viewport. For example,
|
|
@@ -18,19 +14,19 @@ exports.getVisualViewport = void 0;
|
|
|
18
14
|
* which viewport is being measured. Therefore these exported functions will fallback to assuming that the layout
|
|
19
15
|
* viewport is being measured by the browser
|
|
20
16
|
*/
|
|
17
|
+
|
|
21
18
|
// Scrollbar widths vary across properties on different devices and browsers
|
|
22
19
|
var TOLERANCE = 25;
|
|
20
|
+
|
|
23
21
|
/**
|
|
24
22
|
* Use the Visual Viewport API's properties to measure scrollX/Y in reference to the layout viewport
|
|
25
23
|
* in order to determine if window.scrollX/Y is measuring the layout or visual viewport.
|
|
26
24
|
* This finding corresponds to which viewport mouseEvent.clientX/Y and window.innerWidth/Height measures.
|
|
27
25
|
*/
|
|
28
|
-
|
|
29
26
|
function isVisualViewportFactoredIn() {
|
|
30
27
|
var visual = window.visualViewport;
|
|
31
28
|
return Math.abs(visual.pageTop - visual.offsetTop - window.scrollY) > TOLERANCE || Math.abs(visual.pageLeft - visual.offsetLeft - window.scrollX) > TOLERANCE;
|
|
32
29
|
}
|
|
33
|
-
|
|
34
30
|
var convertMouseEventToLayoutCoordinates = function convertMouseEventToLayoutCoordinates(clientX, clientY) {
|
|
35
31
|
var visual = window.visualViewport;
|
|
36
32
|
var normalised = {
|
|
@@ -39,7 +35,6 @@ var convertMouseEventToLayoutCoordinates = function convertMouseEventToLayoutCoo
|
|
|
39
35
|
visualViewportX: clientX,
|
|
40
36
|
visualViewportY: clientY
|
|
41
37
|
};
|
|
42
|
-
|
|
43
38
|
if (!visual) {
|
|
44
39
|
// On old browsers, we cannot normalise, so fallback to clientX/Y
|
|
45
40
|
return normalised;
|
|
@@ -52,12 +47,9 @@ var convertMouseEventToLayoutCoordinates = function convertMouseEventToLayoutCoo
|
|
|
52
47
|
normalised.visualViewportX = Math.round(clientX - visual.offsetLeft);
|
|
53
48
|
normalised.visualViewportY = Math.round(clientY - visual.offsetTop);
|
|
54
49
|
}
|
|
55
|
-
|
|
56
50
|
return normalised;
|
|
57
51
|
};
|
|
58
|
-
|
|
59
52
|
exports.convertMouseEventToLayoutCoordinates = convertMouseEventToLayoutCoordinates;
|
|
60
|
-
|
|
61
53
|
var getVisualViewport = function getVisualViewport() {
|
|
62
54
|
var visual = window.visualViewport;
|
|
63
55
|
return {
|
|
@@ -70,35 +62,5 @@ var getVisualViewport = function getVisualViewport() {
|
|
|
70
62
|
width: visual.width
|
|
71
63
|
};
|
|
72
64
|
};
|
|
73
|
-
|
|
74
65
|
exports.getVisualViewport = getVisualViewport;
|
|
75
|
-
|
|
76
|
-
function getScrollX() {
|
|
77
|
-
var scrollX;
|
|
78
|
-
var visual = window.visualViewport;
|
|
79
|
-
|
|
80
|
-
if (visual) {
|
|
81
|
-
scrollX = visual.pageLeft - visual.offsetLeft;
|
|
82
|
-
} else if (window.scrollX !== undefined) {
|
|
83
|
-
scrollX = window.scrollX;
|
|
84
|
-
} else {
|
|
85
|
-
scrollX = window.pageXOffset || 0;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return Math.round(scrollX);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function getScrollY() {
|
|
92
|
-
var scrollY;
|
|
93
|
-
var visual = window.visualViewport;
|
|
94
|
-
|
|
95
|
-
if (visual) {
|
|
96
|
-
scrollY = visual.pageTop - visual.offsetTop;
|
|
97
|
-
} else if (window.scrollY !== undefined) {
|
|
98
|
-
scrollY = window.scrollY;
|
|
99
|
-
} else {
|
|
100
|
-
scrollY = window.pageYOffset || 0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return Math.round(scrollY);
|
|
104
|
-
}
|
|
66
|
+
//# sourceMappingURL=viewports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewports.js","names":["TOLERANCE","isVisualViewportFactoredIn","visual","window","visualViewport","Math","abs","pageTop","offsetTop","scrollY","pageLeft","offsetLeft","scrollX","convertMouseEventToLayoutCoordinates","clientX","clientY","normalised","layoutViewportX","layoutViewportY","visualViewportX","visualViewportY","round","exports","getVisualViewport","scale","height","width"],"sources":["../../../../src/domain/replay/record/viewports.js"],"sourcesContent":["/**\n * Browsers have not standardized various dimension properties. Mobile devices typically report\n * dimensions in reference to the visual viewport, while desktop uses the layout viewport. For example,\n * Mobile Chrome will change innerWidth when a pinch zoom takes place, while Chrome Desktop (mac) will not.\n *\n * With the new Viewport API, we now calculate and normalize dimension properties to the layout viewport.\n * If the VisualViewport API is not supported by a browser, it isn't reasonably possible to detect or normalize\n * which viewport is being measured. Therefore these exported functions will fallback to assuming that the layout\n * viewport is being measured by the browser\n */\n\n// Scrollbar widths vary across properties on different devices and browsers\nvar TOLERANCE = 25\n\n/**\n * Use the Visual Viewport API's properties to measure scrollX/Y in reference to the layout viewport\n * in order to determine if window.scrollX/Y is measuring the layout or visual viewport.\n * This finding corresponds to which viewport mouseEvent.clientX/Y and window.innerWidth/Height measures.\n */\nfunction isVisualViewportFactoredIn() {\n var visual = window.visualViewport\n return (\n Math.abs(visual.pageTop - visual.offsetTop - window.scrollY) > TOLERANCE ||\n Math.abs(visual.pageLeft - visual.offsetLeft - window.scrollX) > TOLERANCE\n )\n}\n\nexport var convertMouseEventToLayoutCoordinates = function (clientX, clientY) {\n var visual = window.visualViewport\n var normalised = {\n layoutViewportX: clientX,\n layoutViewportY: clientY,\n visualViewportX: clientX,\n visualViewportY: clientY\n }\n\n if (!visual) {\n // On old browsers, we cannot normalise, so fallback to clientX/Y\n return normalised\n } else if (isVisualViewportFactoredIn()) {\n // Typically Mobile Devices\n normalised.layoutViewportX = Math.round(clientX + visual.offsetLeft)\n normalised.layoutViewportY = Math.round(clientY + visual.offsetTop)\n } else {\n // Typically Desktop Devices\n normalised.visualViewportX = Math.round(clientX - visual.offsetLeft)\n normalised.visualViewportY = Math.round(clientY - visual.offsetTop)\n }\n return normalised\n}\n\nexport var getVisualViewport = function () {\n var visual = window.visualViewport\n return {\n scale: visual.scale,\n offsetLeft: visual.offsetLeft,\n offsetTop: visual.offsetTop,\n pageLeft: visual.pageLeft,\n pageTop: visual.pageTop,\n height: visual.height,\n width: visual.width\n }\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAIA,SAAS,GAAG,EAAE;;AAElB;AACA;AACA;AACA;AACA;AACA,SAASC,0BAA0BA,CAAA,EAAG;EACpC,IAAIC,MAAM,GAAGC,MAAM,CAACC,cAAc;EAClC,OACEC,IAAI,CAACC,GAAG,CAACJ,MAAM,CAACK,OAAO,GAAGL,MAAM,CAACM,SAAS,GAAGL,MAAM,CAACM,OAAO,CAAC,GAAGT,SAAS,IACxEK,IAAI,CAACC,GAAG,CAACJ,MAAM,CAACQ,QAAQ,GAAGR,MAAM,CAACS,UAAU,GAAGR,MAAM,CAACS,OAAO,CAAC,GAAGZ,SAAS;AAE9E;AAEO,IAAIa,oCAAoC,GAAG,SAAvCA,oCAAoCA,CAAaC,OAAO,EAAEC,OAAO,EAAE;EAC5E,IAAIb,MAAM,GAAGC,MAAM,CAACC,cAAc;EAClC,IAAIY,UAAU,GAAG;IACfC,eAAe,EAAEH,OAAO;IACxBI,eAAe,EAAEH,OAAO;IACxBI,eAAe,EAAEL,OAAO;IACxBM,eAAe,EAAEL;EACnB,CAAC;EAED,IAAI,CAACb,MAAM,EAAE;IACX;IACA,OAAOc,UAAU;EACnB,CAAC,MAAM,IAAIf,0BAA0B,CAAC,CAAC,EAAE;IACvC;IACAe,UAAU,CAACC,eAAe,GAAGZ,IAAI,CAACgB,KAAK,CAACP,OAAO,GAAGZ,MAAM,CAACS,UAAU,CAAC;IACpEK,UAAU,CAACE,eAAe,GAAGb,IAAI,CAACgB,KAAK,CAACN,OAAO,GAAGb,MAAM,CAACM,SAAS,CAAC;EACrE,CAAC,MAAM;IACL;IACAQ,UAAU,CAACG,eAAe,GAAGd,IAAI,CAACgB,KAAK,CAACP,OAAO,GAAGZ,MAAM,CAACS,UAAU,CAAC;IACpEK,UAAU,CAACI,eAAe,GAAGf,IAAI,CAACgB,KAAK,CAACN,OAAO,GAAGb,MAAM,CAACM,SAAS,CAAC;EACrE;EACA,OAAOQ,UAAU;AACnB,CAAC;AAAAM,OAAA,CAAAT,oCAAA,GAAAA,oCAAA;AAEM,IAAIU,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAA,EAAe;EACzC,IAAIrB,MAAM,GAAGC,MAAM,CAACC,cAAc;EAClC,OAAO;IACLoB,KAAK,EAAEtB,MAAM,CAACsB,KAAK;IACnBb,UAAU,EAAET,MAAM,CAACS,UAAU;IAC7BH,SAAS,EAAEN,MAAM,CAACM,SAAS;IAC3BE,QAAQ,EAAER,MAAM,CAACQ,QAAQ;IACzBH,OAAO,EAAEL,MAAM,CAACK,OAAO;IACvBkB,MAAM,EAAEvB,MAAM,CAACuB,MAAM;IACrBC,KAAK,EAAExB,MAAM,CAACwB;EAChB,CAAC;AACH,CAAC;AAAAJ,OAAA,CAAAC,iBAAA,GAAAA,iBAAA"}
|
|
@@ -13,38 +13,29 @@ exports.resetReplayStats = resetReplayStats;
|
|
|
13
13
|
var MAX_STATS_HISTORY = 10;
|
|
14
14
|
exports.MAX_STATS_HISTORY = MAX_STATS_HISTORY;
|
|
15
15
|
var statsPerView;
|
|
16
|
-
|
|
17
16
|
function getSegmentsCount(viewId) {
|
|
18
17
|
return getOrCreateReplayStats(viewId).segments_count;
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
function addSegment(viewId) {
|
|
22
20
|
getOrCreateReplayStats(viewId).segments_count += 1;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
function addRecord(viewId) {
|
|
26
23
|
getOrCreateReplayStats(viewId).records_count += 1;
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
function addWroteData(viewId, additionalBytesCount) {
|
|
30
26
|
getOrCreateReplayStats(viewId).segments_total_raw_size += additionalBytesCount;
|
|
31
27
|
}
|
|
32
|
-
|
|
33
28
|
function getReplayStats(viewId) {
|
|
34
29
|
return statsPerView && statsPerView.get(viewId);
|
|
35
30
|
}
|
|
36
|
-
|
|
37
31
|
function resetReplayStats() {
|
|
38
32
|
statsPerView = undefined;
|
|
39
33
|
}
|
|
40
|
-
|
|
41
34
|
function getOrCreateReplayStats(viewId) {
|
|
42
35
|
if (!statsPerView) {
|
|
43
36
|
statsPerView = new Map();
|
|
44
37
|
}
|
|
45
|
-
|
|
46
38
|
var replayStats;
|
|
47
|
-
|
|
48
39
|
if (statsPerView.has(viewId)) {
|
|
49
40
|
replayStats = statsPerView.get(viewId);
|
|
50
41
|
} else {
|
|
@@ -54,20 +45,16 @@ function getOrCreateReplayStats(viewId) {
|
|
|
54
45
|
segments_total_raw_size: 0
|
|
55
46
|
};
|
|
56
47
|
statsPerView.set(viewId, replayStats);
|
|
57
|
-
|
|
58
48
|
if (statsPerView.size > MAX_STATS_HISTORY) {
|
|
59
49
|
deleteOldestStats();
|
|
60
50
|
}
|
|
61
51
|
}
|
|
62
|
-
|
|
63
52
|
return replayStats;
|
|
64
53
|
}
|
|
65
|
-
|
|
66
54
|
function deleteOldestStats() {
|
|
67
55
|
if (!statsPerView) {
|
|
68
56
|
return;
|
|
69
57
|
}
|
|
70
|
-
|
|
71
58
|
if (statsPerView.keys) {
|
|
72
59
|
statsPerView["delete"](statsPerView.keys().next().value);
|
|
73
60
|
} else {
|
|
@@ -80,4 +67,5 @@ function deleteOldestStats() {
|
|
|
80
67
|
}
|
|
81
68
|
});
|
|
82
69
|
}
|
|
83
|
-
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=replayStats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replayStats.js","names":["MAX_STATS_HISTORY","exports","statsPerView","getSegmentsCount","viewId","getOrCreateReplayStats","segments_count","addSegment","addRecord","records_count","addWroteData","additionalBytesCount","segments_total_raw_size","getReplayStats","get","resetReplayStats","undefined","Map","replayStats","has","set","size","deleteOldestStats","keys","next","value","isFirst","forEach","_value","key"],"sources":["../../../src/domain/replay/replayStats.js"],"sourcesContent":["export var MAX_STATS_HISTORY = 10\nvar statsPerView\n\nexport function getSegmentsCount(viewId) {\n return getOrCreateReplayStats(viewId).segments_count\n}\n\nexport function addSegment(viewId) {\n getOrCreateReplayStats(viewId).segments_count += 1\n}\n\nexport function addRecord(viewId) {\n getOrCreateReplayStats(viewId).records_count += 1\n}\n\nexport function addWroteData(viewId, additionalBytesCount) {\n getOrCreateReplayStats(viewId).segments_total_raw_size += additionalBytesCount\n}\n\nexport function getReplayStats(viewId) {\n return statsPerView && statsPerView.get(viewId)\n}\n\nexport function resetReplayStats() {\n statsPerView = undefined\n}\n\nfunction getOrCreateReplayStats(viewId) {\n if (!statsPerView) {\n statsPerView = new Map()\n }\n\n var replayStats\n if (statsPerView.has(viewId)) {\n replayStats = statsPerView.get(viewId)\n } else {\n replayStats = {\n records_count: 0,\n segments_count: 0,\n segments_total_raw_size: 0\n }\n statsPerView.set(viewId, replayStats)\n if (statsPerView.size > MAX_STATS_HISTORY) {\n deleteOldestStats()\n }\n }\n\n return replayStats\n}\n\nfunction deleteOldestStats() {\n if (!statsPerView) {\n return\n }\n if (statsPerView.keys) {\n statsPerView.delete(statsPerView.keys().next().value)\n } else {\n // IE11 doesn't support map.keys\n var isFirst = true\n statsPerView.forEach(function (_value, key) {\n if (isFirst) {\n statsPerView.delete(key)\n isFirst = false\n }\n })\n }\n}\n"],"mappings":";;;;;;;;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OAAOJ,WAAW;AACpB;AAEA,SAASI,iBAAiBA,CAAA,EAAG;EAC3B,IAAI,CAACpB,YAAY,EAAE;IACjB;EACF;EACA,IAAIA,YAAY,CAACqB,IAAI,EAAE;IACrBrB,YAAY,UAAO,CAACA,YAAY,CAACqB,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,KAAK,CAAC;EACvD,CAAC,MAAM;IACL;IACA,IAAIC,OAAO,GAAG,IAAI;IAClBxB,YAAY,CAACyB,OAAO,CAAC,UAAUC,MAAM,EAAEC,GAAG,EAAE;MAC1C,IAAIH,OAAO,EAAE;QACXxB,YAAY,UAAO,CAAC2B,GAAG,CAAC;QACxBH,OAAO,GAAG,KAAK;MACjB;IACF,CAAC,CAAC;EACJ;AACF"}
|
|
@@ -5,11 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.buildReplayPayload = buildReplayPayload;
|
|
7
7
|
exports.toFormEntries = toFormEntries;
|
|
8
|
-
|
|
9
8
|
var _browserCore = require("@cloudcare/browser-core");
|
|
10
|
-
|
|
11
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
12
|
-
|
|
9
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
10
|
function buildReplayPayload(data, metadata, rawSegmentBytesCount) {
|
|
14
11
|
var formData = new FormData();
|
|
15
12
|
formData.append('segment', new Blob([data], {
|
|
@@ -18,26 +15,24 @@ function buildReplayPayload(data, metadata, rawSegmentBytesCount) {
|
|
|
18
15
|
toFormEntries(metadata, function (key, value) {
|
|
19
16
|
formData.append(key, value);
|
|
20
17
|
});
|
|
21
|
-
formData.append('raw_segment_size', rawSegmentBytesCount
|
|
18
|
+
formData.append('raw_segment_size', rawSegmentBytesCount);
|
|
22
19
|
return {
|
|
23
20
|
data: formData,
|
|
24
21
|
bytesCount: data.byteLength
|
|
25
22
|
};
|
|
26
23
|
}
|
|
27
|
-
|
|
28
24
|
function toFormEntries(input, onEntry, prefix) {
|
|
29
25
|
if (prefix === undefined) {
|
|
30
26
|
prefix = '';
|
|
31
27
|
}
|
|
32
|
-
|
|
33
28
|
(0, _browserCore.each)((0, _browserCore.objectEntries)(input), function (item) {
|
|
34
29
|
var value = item[1];
|
|
35
30
|
var key = item[0];
|
|
36
|
-
|
|
37
31
|
if (_typeof(value) === 'object' && value !== null) {
|
|
38
32
|
toFormEntries(value, onEntry, '' + prefix + key + '_');
|
|
39
33
|
} else {
|
|
40
34
|
onEntry('' + prefix + key, String(value));
|
|
41
35
|
}
|
|
42
36
|
});
|
|
43
|
-
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=buildReplayPayload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildReplayPayload.js","names":["_browserCore","require","_typeof","obj","Symbol","iterator","constructor","prototype","buildReplayPayload","data","metadata","rawSegmentBytesCount","formData","FormData","append","Blob","type","session","id","start","toFormEntries","key","value","bytesCount","byteLength","input","onEntry","prefix","undefined","each","objectEntries","item","String"],"sources":["../../../../src/domain/replay/segmentCollection/buildReplayPayload.js"],"sourcesContent":["import { objectEntries, each } from '@cloudcare/browser-core'\n\nexport function buildReplayPayload(data, metadata, rawSegmentBytesCount) {\n var formData = new FormData()\n formData.append(\n 'segment',\n new Blob([data], {\n type: 'application/octet-stream'\n }),\n metadata.session.id + '-' + metadata.start\n )\n\n toFormEntries(metadata, function (key, value) {\n formData.append(key, value)\n })\n formData.append('raw_segment_size', rawSegmentBytesCount)\n\n return { data: formData, bytesCount: data.byteLength }\n}\n\nexport function toFormEntries(input, onEntry, prefix) {\n if (prefix === undefined) {\n prefix = ''\n }\n each(objectEntries(input), function (item) {\n var value = item[1]\n var key = item[0]\n if (typeof value === 'object' && value !== null) {\n toFormEntries(value, onEntry, '' + prefix + key + '_')\n } else {\n onEntry('' + prefix + key, String(value))\n }\n })\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAA6D,SAAAC,QAAAC,GAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,GAAA,kBAAAA,GAAA,gBAAAA,GAAA,WAAAA,GAAA,yBAAAC,MAAA,IAAAD,GAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,GAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,GAAA,KAAAD,OAAA,CAAAC,GAAA;AAEtD,SAASK,kBAAkBA,CAACC,IAAI,EAAEC,QAAQ,EAAEC,oBAAoB,EAAE;EACvE,IAAIC,QAAQ,GAAG,IAAIC,QAAQ,CAAC,CAAC;EAC7BD,QAAQ,CAACE,MAAM,CACb,SAAS,EACT,IAAIC,IAAI,CAAC,CAACN,IAAI,CAAC,EAAE;IACfO,IAAI,EAAE;EACR,CAAC,CAAC,EACFN,QAAQ,CAACO,OAAO,CAACC,EAAE,GAAG,GAAG,GAAGR,QAAQ,CAACS,KACvC,CAAC;EAEDC,aAAa,CAACV,QAAQ,EAAE,UAAUW,GAAG,EAAEC,KAAK,EAAE;IAC5CV,QAAQ,CAACE,MAAM,CAACO,GAAG,EAAEC,KAAK,CAAC;EAC7B,CAAC,CAAC;EACFV,QAAQ,CAACE,MAAM,CAAC,kBAAkB,EAAEH,oBAAoB,CAAC;EAEzD,OAAO;IAAEF,IAAI,EAAEG,QAAQ;IAAEW,UAAU,EAAEd,IAAI,CAACe;EAAW,CAAC;AACxD;AAEO,SAASJ,aAAaA,CAACK,KAAK,EAAEC,OAAO,EAAEC,MAAM,EAAE;EACpD,IAAIA,MAAM,KAAKC,SAAS,EAAE;IACxBD,MAAM,GAAG,EAAE;EACb;EACA,IAAAE,iBAAI,EAAC,IAAAC,0BAAa,EAACL,KAAK,CAAC,EAAE,UAAUM,IAAI,EAAE;IACzC,IAAIT,KAAK,GAAGS,IAAI,CAAC,CAAC,CAAC;IACnB,IAAIV,GAAG,GAAGU,IAAI,CAAC,CAAC,CAAC;IACjB,IAAI7B,OAAA,CAAOoB,KAAK,MAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,EAAE;MAC/CF,aAAa,CAACE,KAAK,EAAEI,OAAO,EAAE,EAAE,GAAGC,MAAM,GAAGN,GAAG,GAAG,GAAG,CAAC;IACxD,CAAC,MAAM;MACLK,OAAO,CAAC,EAAE,GAAGC,MAAM,GAAGN,GAAG,EAAEW,MAAM,CAACV,KAAK,CAAC,CAAC;IAC3C;EACF,CAAC,CAAC;AACJ"}
|
|
@@ -15,19 +15,11 @@ Object.defineProperty(exports, "setSegmentBytesLimit", {
|
|
|
15
15
|
return _segmentCollection.setSegmentBytesLimit;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "startDeflateWorker", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _startDeflateWorker.startDeflateWorker;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
18
|
Object.defineProperty(exports, "startSegmentCollection", {
|
|
25
19
|
enumerable: true,
|
|
26
20
|
get: function get() {
|
|
27
21
|
return _segmentCollection.startSegmentCollection;
|
|
28
22
|
}
|
|
29
23
|
});
|
|
30
|
-
|
|
31
24
|
var _segmentCollection = require("./segmentCollection");
|
|
32
|
-
|
|
33
|
-
var _startDeflateWorker = require("./startDeflateWorker");
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_segmentCollection","require"],"sources":["../../../../src/domain/replay/segmentCollection/index.js"],"sourcesContent":["export {\n startSegmentCollection,\n setSegmentBytesLimit\n} from './segmentCollection'\nexport { SEGMENT_BYTES_LIMIT } from './segmentCollection'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA"}
|
|
@@ -1,113 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
4
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.Segment = Segment;
|
|
9
|
-
|
|
10
8
|
var _browserCore = require("@cloudcare/browser-core");
|
|
11
|
-
|
|
12
9
|
var _types = require("../../../types");
|
|
13
|
-
|
|
14
10
|
var replayStats = _interopRequireWildcard(require("../replayStats"));
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var STREAM_ID = 1;
|
|
21
|
-
var nextId = 0;
|
|
22
|
-
|
|
23
|
-
function Segment(worker, context, creationReason, initialRecord, onWrote, onFlushed) {
|
|
24
|
-
this.worker = worker;
|
|
25
|
-
this.pendingWriteCount = 0;
|
|
26
|
-
this.id = nextId++;
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
function Segment(encoder, context, creationReason) {
|
|
14
|
+
this.encoder = encoder;
|
|
27
15
|
var viewId = context.view.id;
|
|
28
16
|
this.metadata = (0, _browserCore.assign)({
|
|
29
|
-
start:
|
|
30
|
-
end:
|
|
17
|
+
start: Infinity,
|
|
18
|
+
end: -Infinity,
|
|
31
19
|
creation_reason: creationReason,
|
|
32
|
-
records_count:
|
|
33
|
-
has_full_snapshot:
|
|
20
|
+
records_count: 0,
|
|
21
|
+
has_full_snapshot: false,
|
|
34
22
|
index_in_view: replayStats.getSegmentsCount(viewId),
|
|
35
23
|
source: 'browser'
|
|
36
24
|
}, context);
|
|
37
25
|
replayStats.addSegment(viewId);
|
|
38
|
-
replayStats.addRecord(viewId);
|
|
39
|
-
var rawBytesCount = 0;
|
|
40
|
-
var compressedBytesCount = 0;
|
|
41
|
-
var compressedData = [];
|
|
42
|
-
|
|
43
|
-
var _this = this;
|
|
44
|
-
|
|
45
|
-
var wokerListener = (0, _browserCore.addEventListener)(worker, 'message', function (params) {
|
|
46
|
-
var data = params.data;
|
|
47
|
-
|
|
48
|
-
if (data.type !== 'wrote') {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (data.id === _this.id) {
|
|
53
|
-
_this.pendingWriteCount -= 1;
|
|
54
|
-
replayStats.addWroteData(viewId, data.additionalBytesCount);
|
|
55
|
-
rawBytesCount += data.additionalBytesCount;
|
|
56
|
-
compressedBytesCount += data.result.length;
|
|
57
|
-
compressedData.push(data.result);
|
|
58
|
-
|
|
59
|
-
if (_this.flushReason && _this.pendingWriteCount === 0) {
|
|
60
|
-
compressedData.push(data.trailer);
|
|
61
|
-
onFlushed((0, _browserCore.concatBuffers)(compressedData), rawBytesCount);
|
|
62
|
-
removeMessageListener();
|
|
63
|
-
} else {
|
|
64
|
-
onWrote(compressedBytesCount);
|
|
65
|
-
}
|
|
66
|
-
} else if (data.id > _this.id) {
|
|
67
|
-
// Messages should be received in the same order as they are sent, so if we receive a
|
|
68
|
-
// message with an id superior to this Segment instance id, we know that another, more
|
|
69
|
-
// recent Segment instance is being used.
|
|
70
|
-
//
|
|
71
|
-
// In theory, a "flush" response should have been received at this point, so the listener
|
|
72
|
-
// should already have been removed. But if something goes wrong and we didn't receive a
|
|
73
|
-
// "flush" response, remove the listener to avoid any leak, and send a monitor message to
|
|
74
|
-
// help investigate the issue.
|
|
75
|
-
removeMessageListener();
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
var removeMessageListener = wokerListener.stop; // worker.addEventListener('message', listener)
|
|
79
|
-
|
|
80
|
-
this.write('{"records":[' + JSON.stringify(initialRecord));
|
|
81
26
|
}
|
|
82
|
-
|
|
83
|
-
Segment.prototype.addRecord = function (record) {
|
|
27
|
+
Segment.prototype.addRecord = function (record, callback) {
|
|
84
28
|
this.metadata.start = Math.min(this.metadata.start, record.timestamp);
|
|
85
29
|
this.metadata.end = Math.max(this.metadata.end, record.timestamp);
|
|
86
30
|
this.metadata.records_count += 1;
|
|
87
|
-
replayStats.addRecord(this.metadata.view.id);
|
|
88
|
-
|
|
89
31
|
if (!this.metadata.has_full_snapshot) {
|
|
90
32
|
this.metadata.has_full_snapshot = record.type === _types.RecordType.FullSnapshot;
|
|
91
33
|
}
|
|
92
|
-
|
|
93
|
-
this.
|
|
34
|
+
replayStats.addRecord(this.metadata.view.id);
|
|
35
|
+
var prefix = this.metadata.records_count === 1 ? '{"records":[' : ',';
|
|
36
|
+
this.encoder.write(prefix + JSON.stringify(record), callback);
|
|
94
37
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
38
|
+
Segment.prototype.flush = function (callback) {
|
|
39
|
+
if (this.metadata.records_count === 0) {
|
|
40
|
+
throw new Error('Empty segment flushed');
|
|
41
|
+
}
|
|
42
|
+
var _this = this;
|
|
43
|
+
this.encoder.write('],' + JSON.stringify(this.metadata).slice(1) + '\n', function () {
|
|
44
|
+
replayStats.addWroteData(_this.metadata.view.id, _this.encoder.getRawBytesCount());
|
|
45
|
+
callback(_this.metadata);
|
|
101
46
|
});
|
|
102
|
-
this.
|
|
47
|
+
this.encoder.reset();
|
|
103
48
|
};
|
|
104
|
-
|
|
105
|
-
Segment.prototype.write = function (data) {
|
|
106
|
-
this.pendingWriteCount += 1;
|
|
107
|
-
this.worker.postMessage({
|
|
108
|
-
data: data,
|
|
109
|
-
id: this.id,
|
|
110
|
-
streamId: STREAM_ID,
|
|
111
|
-
action: 'write'
|
|
112
|
-
});
|
|
113
|
-
};
|
|
49
|
+
//# sourceMappingURL=segment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment.js","names":["_browserCore","require","_types","replayStats","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Segment","encoder","context","creationReason","viewId","view","id","metadata","assign","start","Infinity","end","creation_reason","records_count","has_full_snapshot","index_in_view","getSegmentsCount","source","addSegment","addRecord","record","callback","Math","min","timestamp","max","type","RecordType","FullSnapshot","prefix","write","JSON","stringify","flush","Error","_this","slice","addWroteData","getRawBytesCount","reset"],"sources":["../../../../src/domain/replay/segmentCollection/segment.js"],"sourcesContent":["import { assign } from '@cloudcare/browser-core'\nimport { RecordType } from '../../../types'\nimport * as replayStats from '../replayStats'\n\nexport function Segment(encoder, context, creationReason) {\n this.encoder = encoder\n var viewId = context.view.id\n\n this.metadata = assign(\n {\n start: Infinity,\n end: -Infinity,\n creation_reason: creationReason,\n records_count: 0,\n has_full_snapshot: false,\n index_in_view: replayStats.getSegmentsCount(viewId),\n source: 'browser'\n },\n context\n )\n replayStats.addSegment(viewId)\n}\nSegment.prototype.addRecord = function (record, callback) {\n this.metadata.start = Math.min(this.metadata.start, record.timestamp)\n this.metadata.end = Math.max(this.metadata.end, record.timestamp)\n this.metadata.records_count += 1\n if (!this.metadata.has_full_snapshot) {\n this.metadata.has_full_snapshot = record.type === RecordType.FullSnapshot\n }\n replayStats.addRecord(this.metadata.view.id)\n const prefix = this.metadata.records_count === 1 ? '{\"records\":[' : ','\n this.encoder.write(prefix + JSON.stringify(record), callback)\n}\nSegment.prototype.flush = function (callback) {\n if (this.metadata.records_count === 0) {\n throw new Error('Empty segment flushed')\n }\n var _this = this\n this.encoder.write(\n '],' + JSON.stringify(this.metadata).slice(1) + '\\n',\n function () {\n replayStats.addWroteData(\n _this.metadata.view.id,\n _this.encoder.getRawBytesCount()\n )\n callback(_this.metadata)\n }\n )\n this.encoder.reset()\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAC,uBAAA,CAAAH,OAAA;AAA6C,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA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I,CAACC,SAAS,CAAC,IAAI,CAACzB,QAAQ,CAAC,CAAC6B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,EACpD,YAAY;IACV5D,WAAW,CAAC6D,YAAY,CACtBF,KAAK,CAAC5B,QAAQ,CAACF,IAAI,CAACC,EAAE,EACtB6B,KAAK,CAAClC,OAAO,CAACqC,gBAAgB,CAAC,CACjC,CAAC;IACDjB,QAAQ,CAACc,KAAK,CAAC5B,QAAQ,CAAC;EAC1B,CACF,CAAC;EACD,IAAI,CAACN,OAAO,CAACsC,KAAK,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -8,21 +8,18 @@ exports.computeSegmentContext = computeSegmentContext;
|
|
|
8
8
|
exports.doStartSegmentCollection = doStartSegmentCollection;
|
|
9
9
|
exports.setSegmentBytesLimit = setSegmentBytesLimit;
|
|
10
10
|
exports.startSegmentCollection = startSegmentCollection;
|
|
11
|
-
|
|
12
11
|
var _browserCore = require("@cloudcare/browser-core");
|
|
13
|
-
|
|
14
12
|
var _buildReplayPayload = require("./buildReplayPayload");
|
|
15
|
-
|
|
16
13
|
var _segment = require("./segment");
|
|
17
|
-
|
|
18
14
|
var SEGMENT_DURATION_LIMIT = 30 * _browserCore.ONE_SECOND;
|
|
19
15
|
/**
|
|
20
16
|
* beacon payload max queue size implementation is 64kb
|
|
21
17
|
* ensure that we leave room for logs, rum and potential other users
|
|
22
18
|
*/
|
|
23
|
-
|
|
24
19
|
exports.SEGMENT_DURATION_LIMIT = SEGMENT_DURATION_LIMIT;
|
|
25
|
-
var SEGMENT_BYTES_LIMIT = 60000;
|
|
20
|
+
var SEGMENT_BYTES_LIMIT = 60000;
|
|
21
|
+
|
|
22
|
+
// Segments are the main data structure for session replays. They contain context information used
|
|
26
23
|
// for indexing or UI needs, and a list of records (RRWeb 'events', renamed to avoid confusing
|
|
27
24
|
// namings). They are stored without any processing from the intake, and fetched one after the
|
|
28
25
|
// other while a session is being replayed. Their encoding (deflate) are carefully crafted to allow
|
|
@@ -46,22 +43,18 @@ var SEGMENT_BYTES_LIMIT = 60000; // Segments are the main data structure for ses
|
|
|
46
43
|
//
|
|
47
44
|
// To help investigate session replays issues, each segment is created with a "creation reason",
|
|
48
45
|
// indicating why the session has been created.
|
|
49
|
-
|
|
50
46
|
exports.SEGMENT_BYTES_LIMIT = SEGMENT_BYTES_LIMIT;
|
|
51
|
-
|
|
52
|
-
function startSegmentCollection(lifeCycle, configuration, sessionManager, viewContexts, httpRequest, worker) {
|
|
47
|
+
function startSegmentCollection(lifeCycle, configuration, sessionManager, viewContexts, httpRequest, encoder) {
|
|
53
48
|
return doStartSegmentCollection(lifeCycle, function () {
|
|
54
49
|
return computeSegmentContext(configuration, sessionManager, viewContexts);
|
|
55
|
-
}, httpRequest,
|
|
50
|
+
}, httpRequest, encoder);
|
|
56
51
|
}
|
|
57
|
-
|
|
58
52
|
var SegmentCollectionStatus = {
|
|
59
53
|
WaitingForInitialRecord: 0,
|
|
60
54
|
SegmentPending: 1,
|
|
61
55
|
Stopped: 2
|
|
62
56
|
};
|
|
63
|
-
|
|
64
|
-
function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, worker) {
|
|
57
|
+
function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, encoder) {
|
|
65
58
|
var state = {
|
|
66
59
|
status: SegmentCollectionStatus.WaitingForInitialRecord,
|
|
67
60
|
nextSegmentCreationReason: 'init'
|
|
@@ -74,13 +67,18 @@ function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, wor
|
|
|
74
67
|
flushSegment(pageExitEvent.reason);
|
|
75
68
|
});
|
|
76
69
|
var unsubscribePageExited = subscribePageExited.unsubscribe;
|
|
77
|
-
|
|
78
70
|
function flushSegment(flushReason) {
|
|
79
71
|
if (state.status === SegmentCollectionStatus.SegmentPending) {
|
|
80
|
-
state.segment.flush(
|
|
72
|
+
state.segment.flush(function (metadata) {
|
|
73
|
+
var payload = (0, _buildReplayPayload.buildReplayPayload)(encoder.getEncodedBytes(), metadata, encoder.getRawBytesCount());
|
|
74
|
+
if ((0, _browserCore.isPageExitReason)(flushReason)) {
|
|
75
|
+
httpRequest.sendOnExit(payload);
|
|
76
|
+
} else {
|
|
77
|
+
httpRequest.send(payload);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
81
80
|
(0, _browserCore.clearTimeout)(state.expirationTimeoutId);
|
|
82
81
|
}
|
|
83
|
-
|
|
84
82
|
if (flushReason !== 'stop') {
|
|
85
83
|
state = {
|
|
86
84
|
status: SegmentCollectionStatus.WaitingForInitialRecord,
|
|
@@ -92,47 +90,32 @@ function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, wor
|
|
|
92
90
|
};
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
|
-
|
|
96
|
-
function createNewSegment(creationReason, initialRecord) {
|
|
97
|
-
var context = getSegmentContext();
|
|
98
|
-
|
|
99
|
-
if (!context) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
var segment = new _segment.Segment(worker, context, creationReason, initialRecord, function (compressedSegmentBytesCount) {
|
|
104
|
-
if (!segment.flushReason && compressedSegmentBytesCount > SEGMENT_BYTES_LIMIT) {
|
|
105
|
-
flushSegment('segment_bytes_limit');
|
|
106
|
-
}
|
|
107
|
-
}, function (data, rawSegmentBytesCount) {
|
|
108
|
-
var payload = (0, _buildReplayPayload.buildReplayPayload)(data, segment.metadata, rawSegmentBytesCount);
|
|
109
|
-
|
|
110
|
-
if ((0, _browserCore.isPageExitReason)(segment.flushReason)) {
|
|
111
|
-
httpRequest.sendOnExit(payload);
|
|
112
|
-
} else {
|
|
113
|
-
httpRequest.send(payload);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
state = {
|
|
117
|
-
status: SegmentCollectionStatus.SegmentPending,
|
|
118
|
-
segment: segment,
|
|
119
|
-
expirationTimeoutId: (0, _browserCore.setTimeout)(function () {
|
|
120
|
-
flushSegment('segment_duration_limit');
|
|
121
|
-
}, SEGMENT_DURATION_LIMIT)
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
93
|
return {
|
|
126
94
|
addRecord: function addRecord(record) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
95
|
+
if (state.status === SegmentCollectionStatus.Stopped) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (state.status === SegmentCollectionStatus.WaitingForInitialRecord) {
|
|
99
|
+
var context = getSegmentContext();
|
|
100
|
+
if (!context) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
state = {
|
|
104
|
+
status: SegmentCollectionStatus.SegmentPending,
|
|
105
|
+
segment: new _segment.Segment(encoder, context, state.nextSegmentCreationReason),
|
|
106
|
+
expirationTimeoutId: (0, _browserCore.setTimeout)(function () {
|
|
107
|
+
flushSegment('segment_duration_limit');
|
|
108
|
+
}, SEGMENT_DURATION_LIMIT)
|
|
109
|
+
};
|
|
135
110
|
}
|
|
111
|
+
var segment = state.segment;
|
|
112
|
+
segment.addRecord(record, function () {
|
|
113
|
+
if (
|
|
114
|
+
// the written segment is still pending
|
|
115
|
+
state.status === SegmentCollectionStatus.SegmentPending && state.segment === segment && encoder.getEncodedBytesCount() > SEGMENT_BYTES_LIMIT) {
|
|
116
|
+
flushSegment('segment_bytes_limit');
|
|
117
|
+
}
|
|
118
|
+
});
|
|
136
119
|
},
|
|
137
120
|
stop: function stop() {
|
|
138
121
|
flushSegment('stop');
|
|
@@ -141,15 +124,12 @@ function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, wor
|
|
|
141
124
|
}
|
|
142
125
|
};
|
|
143
126
|
}
|
|
144
|
-
|
|
145
127
|
function computeSegmentContext(configuration, sessionManager, viewContexts) {
|
|
146
128
|
var session = sessionManager.findTrackedSession();
|
|
147
129
|
var viewContext = viewContexts.findView();
|
|
148
|
-
|
|
149
130
|
if (!session || !viewContext) {
|
|
150
131
|
return undefined;
|
|
151
132
|
}
|
|
152
|
-
|
|
153
133
|
return {
|
|
154
134
|
sdk: {
|
|
155
135
|
name: configuration.sdkName,
|
|
@@ -169,11 +149,8 @@ function computeSegmentContext(configuration, sessionManager, viewContexts) {
|
|
|
169
149
|
}
|
|
170
150
|
};
|
|
171
151
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
if (newSegmentBytesLimit === undefined) {
|
|
175
|
-
newSegmentBytesLimit = 60000;
|
|
176
|
-
}
|
|
177
|
-
|
|
152
|
+
function setSegmentBytesLimit() {
|
|
153
|
+
var newSegmentBytesLimit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 60000;
|
|
178
154
|
exports.SEGMENT_BYTES_LIMIT = SEGMENT_BYTES_LIMIT = newSegmentBytesLimit;
|
|
179
|
-
}
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=segmentCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmentCollection.js","names":["_browserCore","require","_buildReplayPayload","_segment","SEGMENT_DURATION_LIMIT","ONE_SECOND","exports","SEGMENT_BYTES_LIMIT","startSegmentCollection","lifeCycle","configuration","sessionManager","viewContexts","httpRequest","encoder","doStartSegmentCollection","computeSegmentContext","SegmentCollectionStatus","WaitingForInitialRecord","SegmentPending","Stopped","getSegmentContext","state","status","nextSegmentCreationReason","subscribeViewCreated","subscribe","LifeCycleEventType","VIEW_CREATED","flushSegment","unsubscribeViewCreated","unsubscribe","subscribePageExited","PAGE_EXITED","pageExitEvent","reason","unsubscribePageExited","flushReason","segment","flush","metadata","payload","buildReplayPayload","getEncodedBytes","getRawBytesCount","isPageExitReason","sendOnExit","send","clearTimeout","expirationTimeoutId","addRecord","record","context","Segment","setTimeout","getEncodedBytesCount","stop","session","findTrackedSession","viewContext","findView","undefined","sdk","name","sdkName","version","sdkVersion","env","service","app","id","applicationId","view","setSegmentBytesLimit","newSegmentBytesLimit","arguments","length"],"sources":["../../../../src/domain/replay/segmentCollection/segmentCollection.js"],"sourcesContent":["import {\n ONE_SECOND,\n LifeCycleEventType,\n isPageExitReason,\n setTimeout,\n clearTimeout\n} from '@cloudcare/browser-core'\nimport { buildReplayPayload } from './buildReplayPayload'\nimport { Segment } from './segment'\n\nexport var SEGMENT_DURATION_LIMIT = 30 * ONE_SECOND\n/**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\nexport var SEGMENT_BYTES_LIMIT = 60000\n\n// Segments are the main data structure for session replays. They contain context information used\n// for indexing or UI needs, and a list of records (RRWeb 'events', renamed to avoid confusing\n// namings). They are stored without any processing from the intake, and fetched one after the\n// other while a session is being replayed. Their encoding (deflate) are carefully crafted to allow\n// concatenating multiple segments together. Segments have a size overhead (metadata), so our goal is to\n// build segments containing as many records as possible while complying with the various flush\n// strategies to guarantee a good replay quality.\n//\n// When the recording starts, a segment is initially created. The segment is flushed (finalized and\n// sent) based on various events (non-exhaustive list):\n//\n// * the page visibility change or becomes to unload\n// * the segment duration reaches a limit\n// * the encoded segment bytes count reaches a limit\n// * ...\n//\n// A segment cannot be created without its context. If the RUM session ends and no session id is\n// available when creating a new segment, records will be ignored, until the session is renewed and\n// a new session id is available.\n//\n// Empty segments (segments with no record) aren't useful and should be ignored.\n//\n// To help investigate session replays issues, each segment is created with a \"creation reason\",\n// indicating why the session has been created.\n\nexport function startSegmentCollection(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n httpRequest,\n encoder\n) {\n return doStartSegmentCollection(\n lifeCycle,\n function () {\n return computeSegmentContext(configuration, sessionManager, viewContexts)\n },\n httpRequest,\n encoder\n )\n}\n\nvar SegmentCollectionStatus = {\n WaitingForInitialRecord: 0,\n SegmentPending: 1,\n Stopped: 2\n}\n\nexport function doStartSegmentCollection(\n lifeCycle,\n getSegmentContext,\n httpRequest,\n encoder\n) {\n var state = {\n status: SegmentCollectionStatus.WaitingForInitialRecord,\n nextSegmentCreationReason: 'init'\n }\n var subscribeViewCreated = lifeCycle.subscribe(\n LifeCycleEventType.VIEW_CREATED,\n function () {\n flushSegment('view_change')\n }\n )\n var unsubscribeViewCreated = subscribeViewCreated.unsubscribe\n var subscribePageExited = lifeCycle.subscribe(\n LifeCycleEventType.PAGE_EXITED,\n function (pageExitEvent) {\n flushSegment(pageExitEvent.reason)\n }\n )\n var unsubscribePageExited = subscribePageExited.unsubscribe\n\n function flushSegment(flushReason) {\n if (state.status === SegmentCollectionStatus.SegmentPending) {\n state.segment.flush(function (metadata) {\n var payload = buildReplayPayload(\n encoder.getEncodedBytes(),\n metadata,\n encoder.getRawBytesCount()\n )\n\n if (isPageExitReason(flushReason)) {\n httpRequest.sendOnExit(payload)\n } else {\n httpRequest.send(payload)\n }\n })\n clearTimeout(state.expirationTimeoutId)\n }\n\n if (flushReason !== 'stop') {\n state = {\n status: SegmentCollectionStatus.WaitingForInitialRecord,\n nextSegmentCreationReason: flushReason\n }\n } else {\n state = {\n status: SegmentCollectionStatus.Stopped\n }\n }\n }\n\n return {\n addRecord: function (record) {\n if (state.status === SegmentCollectionStatus.Stopped) {\n return\n }\n\n if (state.status === SegmentCollectionStatus.WaitingForInitialRecord) {\n var context = getSegmentContext()\n if (!context) {\n return\n }\n\n state = {\n status: SegmentCollectionStatus.SegmentPending,\n segment: new Segment(\n encoder,\n context,\n state.nextSegmentCreationReason\n ),\n expirationTimeoutId: setTimeout(function () {\n flushSegment('segment_duration_limit')\n }, SEGMENT_DURATION_LIMIT)\n }\n }\n\n var segment = state.segment\n\n segment.addRecord(record, function () {\n if (\n // the written segment is still pending\n state.status === SegmentCollectionStatus.SegmentPending &&\n state.segment === segment &&\n encoder.getEncodedBytesCount() > SEGMENT_BYTES_LIMIT\n ) {\n flushSegment('segment_bytes_limit')\n }\n })\n },\n\n stop: function () {\n flushSegment('stop')\n unsubscribeViewCreated()\n unsubscribePageExited()\n }\n }\n}\n\nexport function computeSegmentContext(\n configuration,\n sessionManager,\n viewContexts\n) {\n var session = sessionManager.findTrackedSession()\n var viewContext = viewContexts.findView()\n if (!session || !viewContext) {\n return undefined\n }\n return {\n sdk: {\n name: configuration.sdkName,\n version: configuration.sdkVersion\n },\n env: configuration.env || '',\n service: viewContext.service || configuration.service || 'browser',\n version: viewContext.version || configuration.version || '',\n app: {\n id: configuration.applicationId\n },\n session: {\n id: session.id\n },\n view: {\n id: viewContext.id\n }\n }\n}\n\nexport function setSegmentBytesLimit(newSegmentBytesLimit = 60_000) {\n SEGMENT_BYTES_LIMIT = newSegmentBytesLimit\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEO,IAAIG,sBAAsB,GAAG,EAAE,GAAGC,uBAAU;AACnD;AACA;AACA;AACA;AAHAC,OAAA,CAAAF,sBAAA,GAAAA,sBAAA;AAIO,IAAIG,mBAAmB,GAAG,KAAK;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAAD,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAEO,SAASC,sBAAsBA,CACpCC,SAAS,EACTC,aAAa,EACbC,cAAc,EACdC,YAAY,EACZC,WAAW,EACXC,OAAO,EACP;EACA,OAAOC,wBAAwB,CAC7BN,SAAS,EACT,YAAY;IACV,OAAOO,qBAAqB,CAACN,aAAa,EAAEC,cAAc,EAAEC,YAAY,CAAC;EAC3E,CAAC,EACDC,WAAW,EACXC,OACF,CAAC;AACH;AAEA,IAAIG,uBAAuB,GAAG;EAC5BC,uBAAuB,EAAE,CAAC;EAC1BC,cAAc,EAAE,CAAC;EACjBC,OAAO,EAAE;AACX,CAAC;AAEM,SAASL,wBAAwBA,CACtCN,SAAS,EACTY,iBAAiB,EACjBR,WAAW,EACXC,OAAO,EACP;EACA,IAAIQ,KAAK,GAAG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