@cloudcare/browser-rum 3.3.23 → 3.3.25
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/README.md +33 -0
- package/README.zh.md +30 -0
- package/bundle/dataflux-rum.js +1 -1
- package/cjs/boot/buildEnv.js +1 -1
- package/cjs/boot/disabledRumPublicApi.js +5 -0
- package/cjs/boot/disabledRumPublicApi.js.map +1 -1
- package/cjs/boot/initCallbacks.js +25 -0
- package/cjs/boot/initCallbacks.js.map +1 -0
- package/cjs/boot/perStartRum.js +99 -50
- package/cjs/boot/perStartRum.js.map +1 -1
- package/cjs/boot/rum.js +7 -4
- package/cjs/boot/rum.js.map +1 -1
- package/cjs/boot/rumPublicApi.js +6 -7
- package/cjs/boot/rumPublicApi.js.map +1 -1
- package/cjs/boot/startRecording.js +2 -0
- package/cjs/boot/startRecording.js.map +1 -1
- package/cjs/domain/configuration.js +15 -2
- package/cjs/domain/configuration.js.map +1 -1
- package/cjs/domain/contexts/urlContexts.js +32 -21
- package/cjs/domain/contexts/urlContexts.js.map +1 -1
- package/cjs/domain/contexts/viewContexts.js +1 -1
- package/cjs/domain/contexts/viewContexts.js.map +1 -1
- package/cjs/domain/deflate/deflateWorker.js +39 -27
- package/cjs/domain/deflate/deflateWorker.js.map +1 -1
- package/cjs/domain/privacy.js +9 -6
- package/cjs/domain/privacy.js.map +1 -1
- package/cjs/domain/replay/record/canvasCommandCapture.js +91 -179
- package/cjs/domain/replay/record/canvasCommandCapture.js.map +1 -1
- package/cjs/domain/replay/record/canvasCommandObserverStub.js +24 -0
- package/cjs/domain/replay/record/canvasCommandObserverStub.js.map +1 -0
- package/cjs/domain/replay/record/canvasCommandSerializeArgs.js +3 -2
- package/cjs/domain/replay/record/canvasCommandSerializeArgs.js.map +1 -1
- package/cjs/domain/replay/record/canvasContext.js +25 -0
- package/cjs/domain/replay/record/canvasContext.js.map +1 -1
- package/cjs/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/cjs/domain/replay/record/canvasObserver.js +3 -0
- package/cjs/domain/replay/record/canvasObserver.js.map +1 -1
- package/cjs/domain/replay/record/mutationObserver.js +3 -12
- package/cjs/domain/replay/record/mutationObserver.js.map +1 -1
- package/cjs/domain/replay/record/record.js +1 -1
- package/cjs/domain/replay/record/record.js.map +1 -1
- package/cjs/domain/replay/record/serialize.js +15 -13
- package/cjs/domain/replay/record/serialize.js.map +1 -1
- package/cjs/domain/replay/segmentCollection/buildReplayPayload.js +21 -6
- package/cjs/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
- package/cjs/domain/replay/segmentCollection/segmentCollection.js +91 -143
- package/cjs/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
- package/cjs/domain/replayCanvasSupported.js +8 -0
- package/cjs/domain/replayCanvasSupported.js.map +1 -0
- package/cjs/domain/requestCollection.js +38 -39
- package/cjs/domain/requestCollection.js.map +1 -1
- package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js +1 -1
- package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -1
- package/cjs/domain/rumEventsCollection/resource/fetchTimingRegistry.js +143 -0
- package/cjs/domain/rumEventsCollection/resource/fetchTimingRegistry.js.map +1 -0
- package/cjs/domain/rumEventsCollection/resource/matchRequestResourceEntry.js +2 -2
- package/cjs/domain/rumEventsCollection/resource/matchRequestResourceEntry.js.map +1 -1
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js +77 -45
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
- package/cjs/domain/rumEventsCollection/resource/resourceTrackerManager.js +11 -9
- package/cjs/domain/rumEventsCollection/resource/resourceTrackerManager.js.map +1 -1
- package/cjs/domain/rumEventsCollection/resource/resourceUtils.js +30 -40
- package/cjs/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -1
- package/cjs/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js +7 -1
- package/cjs/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackViews.js +3 -0
- package/cjs/domain/rumEventsCollection/view/trackViews.js.map +1 -1
- package/cjs/domain/tracing/skywalkingTracer.js +4 -50
- package/cjs/domain/tracing/skywalkingTracer.js.map +1 -1
- package/cjs/domain/tracing/tracer.js +26 -3
- package/cjs/domain/tracing/tracer.js.map +1 -1
- package/esm/boot/buildEnv.js +2 -5
- package/esm/boot/buildEnv.js.map +1 -1
- package/esm/boot/disabledRumPublicApi.js +2 -35
- package/esm/boot/disabledRumPublicApi.js.map +1 -1
- package/esm/boot/initCallbacks.js +2 -0
- package/esm/boot/initCallbacks.js.map +1 -0
- package/esm/boot/perStartRum.js +2 -260
- package/esm/boot/perStartRum.js.map +1 -1
- package/esm/boot/recorderApi.js +2 -338
- package/esm/boot/recorderApi.js.map +1 -1
- package/esm/boot/recorderApiStub.js +2 -21
- package/esm/boot/recorderApiStub.js.map +1 -1
- package/esm/boot/rum.entry.js +2 -13
- package/esm/boot/rum.entry.js.map +1 -1
- package/esm/boot/rum.js +2 -184
- package/esm/boot/rum.js.map +1 -1
- package/esm/boot/rum.slim.entry.js +2 -7
- package/esm/boot/rum.slim.entry.js.map +1 -1
- package/esm/boot/rumEntryFactory.js +2 -18
- package/esm/boot/rumEntryFactory.js.map +1 -1
- package/esm/boot/rumPublicApi.js +2 -344
- package/esm/boot/rumPublicApi.js.map +1 -1
- package/esm/boot/rumRecorderApiStub.js +2 -13
- package/esm/boot/rumRecorderApiStub.js.map +1 -1
- package/esm/boot/rumSlimConfiguration.js +2 -10
- package/esm/boot/rumSlimConfiguration.js.map +1 -1
- package/esm/boot/sessionReplayPublicApi.js +2 -43
- package/esm/boot/sessionReplayPublicApi.js.map +1 -1
- package/esm/boot/startRecording.js +2 -444
- package/esm/boot/startRecording.js.map +1 -1
- package/esm/constants.js +2 -28
- package/esm/constants.js.map +1 -1
- package/esm/domain/assembly.js +2 -213
- package/esm/domain/assembly.js.map +1 -1
- package/esm/domain/configuration.js +2 -323
- package/esm/domain/configuration.js.map +1 -1
- package/esm/domain/contexts/commonContext.js +2 -8
- package/esm/domain/contexts/commonContext.js.map +1 -1
- package/esm/domain/contexts/displayContext.js +2 -16
- package/esm/domain/contexts/displayContext.js.map +1 -1
- package/esm/domain/contexts/foregroundContexts.js +2 -103
- package/esm/domain/contexts/foregroundContexts.js.map +1 -1
- package/esm/domain/contexts/internalContext.js +2 -41
- package/esm/domain/contexts/internalContext.js.map +1 -1
- package/esm/domain/contexts/pageStateHistory.js +2 -104
- package/esm/domain/contexts/pageStateHistory.js.map +1 -1
- package/esm/domain/contexts/urlContexts.js +2 -85
- package/esm/domain/contexts/urlContexts.js.map +1 -1
- package/esm/domain/contexts/viewContexts.js +2 -45
- package/esm/domain/contexts/viewContexts.js.map +1 -1
- package/esm/domain/deflate/deflateEncoder.js +2 -592
- package/esm/domain/deflate/deflateEncoder.js.map +1 -1
- package/esm/domain/deflate/deflateWorker.js +2 -225
- package/esm/domain/deflate/deflateWorker.js.map +1 -1
- package/esm/domain/deflate/index.js +2 -3
- package/esm/domain/deflate/index.js.map +1 -1
- package/esm/domain/domMutationObservable.js +2 -62
- package/esm/domain/domMutationObservable.js.map +1 -1
- package/esm/domain/encoderStreamId.js +2 -6
- package/esm/domain/encoderStreamId.js.map +1 -1
- package/esm/domain/firstInputPolyfill.js +2 -77
- package/esm/domain/firstInputPolyfill.js.map +1 -1
- package/esm/domain/initViewportObservable.js +2 -36
- package/esm/domain/initViewportObservable.js.map +1 -1
- package/esm/domain/locationChangeObservable.js +2 -65
- package/esm/domain/locationChangeObservable.js.map +1 -1
- package/esm/domain/performanceObservable.js +2 -116
- package/esm/domain/performanceObservable.js.map +1 -1
- package/esm/domain/performanceUtils.js +2 -45
- package/esm/domain/performanceUtils.js.map +1 -1
- package/esm/domain/plugins.js +2 -59
- package/esm/domain/plugins.js.map +1 -1
- package/esm/domain/privacy.js +2 -266
- package/esm/domain/privacy.js.map +1 -1
- package/esm/domain/replay/record/canvasAutoSnapshot.js +2 -9
- package/esm/domain/replay/record/canvasAutoSnapshot.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandCapture.js +2 -1275
- package/esm/domain/replay/record/canvasCommandCapture.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandObserver.js +2 -1207
- package/esm/domain/replay/record/canvasCommandObserver.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandObserverStub.js +2 -0
- package/esm/domain/replay/record/canvasCommandObserverStub.js.map +1 -0
- package/esm/domain/replay/record/canvasCommandSerializeArgs.js +2 -111
- package/esm/domain/replay/record/canvasCommandSerializeArgs.js.map +1 -1
- package/esm/domain/replay/record/canvasContext.js +2 -50
- package/esm/domain/replay/record/canvasContext.js.map +1 -1
- package/esm/domain/replay/record/canvasContinuousScheduler.js +2 -378
- package/esm/domain/replay/record/canvasContinuousScheduler.js.map +1 -1
- package/esm/domain/replay/record/canvasEncodeBridge.js +2 -692
- package/esm/domain/replay/record/canvasEncodeBridge.js.map +1 -1
- package/esm/domain/replay/record/canvasEncodeWorker.js +2 -164
- package/esm/domain/replay/record/canvasEncodeWorker.js.map +1 -1
- package/esm/domain/replay/record/canvasFrameSignature.js +2 -75
- package/esm/domain/replay/record/canvasFrameSignature.js.map +1 -1
- package/esm/domain/replay/record/canvasMutationRecord.js +2 -26
- package/esm/domain/replay/record/canvasMutationRecord.js.map +1 -1
- package/esm/domain/replay/record/canvasObserver.js +2 -420
- package/esm/domain/replay/record/canvasObserver.js.map +1 -1
- package/esm/domain/replay/record/canvasSerializeArgs.js +2 -101
- package/esm/domain/replay/record/canvasSerializeArgs.js.map +1 -1
- package/esm/domain/replay/record/canvasWebGLPluginHost.js +2 -26
- package/esm/domain/replay/record/canvasWebGLPluginHost.js.map +1 -1
- package/esm/domain/replay/record/elementsScrollPositions.js +2 -23
- package/esm/domain/replay/record/elementsScrollPositions.js.map +1 -1
- package/esm/domain/replay/record/index.js +2 -4
- package/esm/domain/replay/record/index.js.map +1 -1
- package/esm/domain/replay/record/mutationBatch.js +2 -562
- package/esm/domain/replay/record/mutationBatch.js.map +1 -1
- package/esm/domain/replay/record/mutationObserver.js +2 -2332
- package/esm/domain/replay/record/mutationObserver.js.map +1 -1
- package/esm/domain/replay/record/mutationResourceBudget.js +2 -137
- package/esm/domain/replay/record/mutationResourceBudget.js.map +1 -1
- package/esm/domain/replay/record/observers.js +2 -624
- package/esm/domain/replay/record/observers.js.map +1 -1
- package/esm/domain/replay/record/privacy.js +2 -1
- package/esm/domain/replay/record/privacy.js.map +1 -1
- package/esm/domain/replay/record/record.js +2 -3511
- package/esm/domain/replay/record/record.js.map +1 -1
- package/esm/domain/replay/record/serializationUtils.js +2 -677
- package/esm/domain/replay/record/serializationUtils.js.map +1 -1
- package/esm/domain/replay/record/serialize.js +2 -735
- package/esm/domain/replay/record/serialize.js.map +1 -1
- package/esm/domain/replay/record/shadowRootsController.js +2 -902
- package/esm/domain/replay/record/shadowRootsController.js.map +1 -1
- package/esm/domain/replay/record/utils.js +2 -36
- package/esm/domain/replay/record/utils.js.map +1 -1
- package/esm/domain/replay/record/viewports.js +2 -58
- package/esm/domain/replay/record/viewports.js.map +1 -1
- package/esm/domain/replay/replayStats.js +2 -59
- package/esm/domain/replay/replayStats.js.map +1 -1
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js +2 -31
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
- package/esm/domain/replay/segmentCollection/index.js +2 -3
- package/esm/domain/replay/segmentCollection/index.js.map +1 -1
- package/esm/domain/replay/segmentCollection/segment.js +2 -415
- package/esm/domain/replay/segmentCollection/segment.js.map +1 -1
- package/esm/domain/replay/segmentCollection/segmentCollection.js +2 -1114
- package/esm/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
- package/esm/domain/replay/startRecordBridge.js +2 -13
- package/esm/domain/replay/startRecordBridge.js.map +1 -1
- package/esm/domain/replay/timeAnchor.js +2 -20
- package/esm/domain/replay/timeAnchor.js.map +1 -1
- package/esm/domain/replayCanvasSupported.js +2 -0
- package/esm/domain/replayCanvasSupported.js.map +1 -0
- package/esm/domain/requestCollection.js +2 -121
- package/esm/domain/requestCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/actionCollection.js +2 -83
- package/esm/domain/rumEventsCollection/actions/actionCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/clickChain.js +2 -62
- package/esm/domain/rumEventsCollection/actions/clickChain.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js +2 -67
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js +2 -279
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js +2 -233
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/interactionSelectorCache.js +2 -21
- package/esm/domain/rumEventsCollection/actions/interactionSelectorCache.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js +2 -67
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js +2 -263
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/errorCollection.js +2 -93
- package/esm/domain/rumEventsCollection/error/errorCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js +2 -12
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/trackReportError.js +2 -19
- package/esm/domain/rumEventsCollection/error/trackReportError.js.map +1 -1
- package/esm/domain/rumEventsCollection/longTask/longAnimationFrameCollection.js +2 -55
- package/esm/domain/rumEventsCollection/longTask/longAnimationFrameCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js +2 -38
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/fetchTimingRegistry.js +2 -0
- package/esm/domain/rumEventsCollection/resource/fetchTimingRegistry.js.map +1 -0
- package/esm/domain/rumEventsCollection/resource/matchRequestResourceEntry.js +2 -69
- package/esm/domain/rumEventsCollection/resource/matchRequestResourceEntry.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js +2 -294
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceTrackerManager.js +2 -232
- package/esm/domain/rumEventsCollection/resource/resourceTrackerManager.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js +2 -218
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js +2 -19
- package/esm/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/webSocketCollection.js +2 -191
- package/esm/domain/rumEventsCollection/resource/webSocketCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js +2 -47
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js +2 -42
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +2 -117
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +2 -20
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js +2 -49
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstInput.js +2 -41
- package/esm/domain/rumEventsCollection/view/trackFirstInput.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js +2 -44
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +2 -153
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +2 -54
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js +2 -50
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js +2 -73
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js +2 -84
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackSoftNavigationMetrics.js +2 -38
- package/esm/domain/rumEventsCollection/view/trackSoftNavigationMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js +2 -15
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackViews.js +2 -418
- package/esm/domain/rumEventsCollection/view/trackViews.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/viewCollection.js +2 -127
- package/esm/domain/rumEventsCollection/view/viewCollection.js.map +1 -1
- package/esm/domain/rumSessionManager.js +2 -208
- package/esm/domain/rumSessionManager.js.map +1 -1
- package/esm/domain/tracing/ddtraceTracer.js +2 -40
- package/esm/domain/tracing/ddtraceTracer.js.map +1 -1
- package/esm/domain/tracing/getDocumentTraceId.js +2 -69
- package/esm/domain/tracing/getDocumentTraceId.js.map +1 -1
- package/esm/domain/tracing/jaegerTracer.js +2 -42
- package/esm/domain/tracing/jaegerTracer.js.map +1 -1
- package/esm/domain/tracing/sampler.js +2 -61
- package/esm/domain/tracing/sampler.js.map +1 -1
- package/esm/domain/tracing/skywalkingTracer.js +2 -90
- package/esm/domain/tracing/skywalkingTracer.js.map +1 -1
- package/esm/domain/tracing/traceIdentifier.js +2 -57
- package/esm/domain/tracing/traceIdentifier.js.map +1 -1
- package/esm/domain/tracing/tracer.js +2 -128
- package/esm/domain/tracing/tracer.js.map +1 -1
- package/esm/domain/tracing/w3cTraceParentTracer.js +2 -69
- package/esm/domain/tracing/w3cTraceParentTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinMultiTracer.js +2 -42
- package/esm/domain/tracing/zipkinMultiTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinSingleTracer.js +2 -41
- package/esm/domain/tracing/zipkinSingleTracer.js.map +1 -1
- package/esm/domain/trackEventCounts.js +2 -49
- package/esm/domain/trackEventCounts.js.map +1 -1
- package/esm/domain/usr/index.js +2 -38
- package/esm/domain/usr/index.js.map +1 -1
- package/esm/domain/visitorId/index.js +2 -406
- package/esm/domain/visitorId/index.js.map +1 -1
- package/esm/domain/waitPageActivityEnd.js +2 -142
- package/esm/domain/waitPageActivityEnd.js.map +1 -1
- package/esm/index.js +2 -4
- package/esm/index.js.map +1 -1
- package/esm/transport/startRumBatch.js +2 -74
- package/esm/transport/startRumBatch.js.map +1 -1
- package/esm/transport/startRumEventBridge.js +2 -9
- package/esm/transport/startRumEventBridge.js.map +1 -1
- package/esm/types/index.js +2 -1
- package/esm/types/index.js.map +1 -1
- package/esm/types/sessionReplayConstants.js +2 -46
- package/esm/types/sessionReplayConstants.js.map +1 -1
- package/package.json +8 -8
- package/src/boot/disabledRumPublicApi.js +5 -0
- package/src/boot/initCallbacks.js +16 -0
- package/src/boot/perStartRum.js +102 -59
- package/src/boot/rum.js +7 -4
- package/src/boot/rumPublicApi.js +6 -8
- package/src/boot/startRecording.js +2 -0
- package/src/domain/configuration.js +13 -2
- package/src/domain/contexts/urlContexts.js +34 -27
- package/src/domain/contexts/viewContexts.js +2 -2
- package/src/domain/deflate/deflateWorker.js +35 -21
- package/src/domain/privacy.js +13 -13
- package/src/domain/replay/record/canvasCommandCapture.js +105 -239
- package/src/domain/replay/record/canvasCommandObserverStub.js +11 -0
- package/src/domain/replay/record/canvasCommandSerializeArgs.js +2 -2
- package/src/domain/replay/record/canvasContext.js +32 -0
- package/src/domain/replay/record/canvasObserver.js +5 -1
- package/src/domain/replay/record/mutationObserver.js +6 -22
- package/src/domain/replay/record/record.js +1 -1
- package/src/domain/replay/record/serialize.js +24 -11
- package/src/domain/replay/segmentCollection/buildReplayPayload.js +24 -14
- package/src/domain/replay/segmentCollection/segmentCollection.js +97 -227
- package/src/domain/replayCanvasSupported.js +1 -0
- package/src/domain/requestCollection.js +39 -51
- package/src/domain/rumEventsCollection/actions/listenActionEvents.js +8 -2
- package/src/domain/rumEventsCollection/resource/fetchTimingRegistry.js +138 -0
- package/src/domain/rumEventsCollection/resource/matchRequestResourceEntry.js +2 -2
- package/src/domain/rumEventsCollection/resource/resourceCollection.js +87 -64
- package/src/domain/rumEventsCollection/resource/resourceTrackerManager.js +10 -10
- package/src/domain/rumEventsCollection/resource/resourceUtils.js +36 -59
- package/src/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js +8 -2
- package/src/domain/rumEventsCollection/view/trackViews.js +3 -0
- package/src/domain/tracing/skywalkingTracer.js +14 -91
- package/src/domain/tracing/tracer.js +28 -4
- package/types/index.d.ts +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitPageActivityEnd.js","names":["Observable","each","timeStampNow","LifeCycleEventType","some","matchList","instrumentMethod","setTimeout","clearTimeout","createPerformanceObservable","RumPerformanceEntryType","PAGE_ACTIVITY_VALIDATION_DELAY","PAGE_ACTIVITY_END_DELAY","waitPageActivityEnd","lifeCycle","domMutationObservable","configuration","pageActivityEndCallback","maxDuration","
|
|
1
|
+
{"version":3,"file":"waitPageActivityEnd.js","names":["Observable","each","timeStampNow","LifeCycleEventType","some","matchList","instrumentMethod","setTimeout","clearTimeout","createPerformanceObservable","RumPerformanceEntryType","PAGE_ACTIVITY_VALIDATION_DELAY","PAGE_ACTIVITY_END_DELAY","waitPageActivityEnd","lifeCycle","domMutationObservable","configuration","pageActivityEndCallback","maxDuration","doWaitPageActivityEnd","createPageActivityObservable","pageActivityObservable","pageActivityEndTimeoutId","hasCompleted","validationTimeoutId","complete","hadActivity","maxDurationTimeoutId","undefined","end","pageActivitySubscription","subscribe","data","isBusy","lastChangeTime","stop","unsubscribe","event","observable","firstRequestIndex","subscriptions","pendingRequestsCount","push","notifyPageActivity","type","RESOURCE","entries","entry","isExcludedUrl","name","REQUEST_STARTED","startEvent","url","requestIndex","REQUEST_COMPLETED","request","stopTrackingWindowOpen","trackWindowOpen","callback","window","s","notify","requestUrl","excludedActivityUrls"],"sources":["../../src/domain/waitPageActivityEnd.js"],"mappings":"OACEA,WACAC,KACAC,aACAC,mBACAC,KACAC,UACAC,iBACAC,WACAC,iBACK,iCAELC,4BACAC,4BACK,yCAEA,IAAIC,+BAAiC,WAErC,IAAIC,wBAA0B,WAgC9B,SAASC,oBACdC,UACAC,sBACAC,cACAC,wBACAC,aAOA,OAAOC,sBALsBC,6BAC3BN,UACAC,sBACAC,eAIAC,wBACAC,YAEJ,QAEO,SAASC,sBACdE,uBACAJ,wBACAC,aAEA,IAAII,yBACAC,cAAe,EACfC,oBAAsBjB,YAAW,WACnCkB,SAAS,CAAEC,aAAa,GAC1B,GAAGf,gCAECgB,0BACcC,IAAhBV,YACIX,YAAW,WACT,OAAOkB,SAAS,CAAEC,aAAa,EAAMG,IAAK3B,gBAC5C,GAAGgB,kBACHU,EAEFE,yBAA2BT,uBAAuBU,WAAU,SAC9DC,MAEA,IAAIC,OAASD,KAAKC,OAClBzB,aAAagB,qBACbhB,aAAac,0BACb,IAAIY,eAAiBhC,eAChB+B,SACHX,yBAA2Bf,YAAW,WACpCkB,SAAS,CAAEC,aAAa,EAAMG,IAAKK,gBACrC,GAAGtB,yBAEP,IACIuB,KAAO,SAAPA,OACFZ,cAAe,EACff,aAAagB,qBACbhB,aAAac,0BACbd,aAAamB,sBACbG,yBAAyBM,aAC3B,EACA,SAASX,SAASY,OACZd,eAGJY,MAAQA,OACRlB,wBAAwBoB,OAC1B,CACA,MAAO,CAAEF,KAAMA,KACjB,QAEO,SAASf,6BACdN,UACAC,sBACAC,eAEA,OAAO,IAAIhB,YAAW,SAAUsC,YAC9B,IACIC,kBADAC,cAAgB,GAEhBC,qBAAuB,EAE3BD,cAAcE,KACZ3B,sBAAsBgB,WAAU,WAC9BY,oBACF,IACAlC,4BAA4BO,cAAe,CACzC4B,KAAMlC,wBAAwBmC,WAC7Bd,WAAU,SAAUe,SAEnB1C,KAAK0C,SAAS,SAAUC,OACtB,OAAQC,cAAchC,cAAe+B,MAAME,KAC7C,KAEAN,oBAEJ,IACA7B,UAAUiB,UACR5B,mBAAmB+C,iBACnB,SAAUC,YACJH,cAAchC,cAAemC,WAAWC,YAIlBxB,IAAtBW,oBACFA,kBAAoBY,WAAWE,cAEjCZ,sBAAwB,EACxBE,qBACF,IAEF7B,UAAUiB,UACR5B,mBAAmBmD,mBACnB,SAAUC,SAENP,cAAchC,cAAeuC,QAAQH,WACfxB,IAAtBW,mBAEAgB,QAAQF,aAAed,oBAKzBE,sBAAwB,EACxBE,qBACF,KAIJ,IACIa,uBAkBR,SAASC,gBAAgBC,UACvB,OAAOpD,iBAAiBqD,OAAQ,OAAQD,SAC1C,CArB2BD,CAAgBd,oBACOR,KAC9C,OAAO,WACLqB,yBACAvD,KAAKuC,eAAe,SAAUoB,GAC5BA,EAAExB,aACJ,GACF,EAEA,SAASO,qBACPL,WAAWuB,OAAO,CAAE5B,OAAQQ,qBAAuB,GACrD,CACF,GACF,CAEA,SAASO,cAAchC,cAAe8C,YACpC,OAAOzD,UAAUW,cAAc+C,qBAAsBD,WACvD","ignoreList":[]}
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { TraceType } from '@cloudcare/browser-core';
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{datafluxRum}from"./boot/rum.entry";export{datafluxRum};export{TraceType}from"@cloudcare/browser-core";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["datafluxRum","TraceType"],"sources":["../src/index.js"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["datafluxRum","TraceType"],"sources":["../src/index.js"],"mappings":"OAASA,gBAAmB,0BACnBA,oBACAC,cAAiB","ignoreList":[]}
|
|
@@ -1,74 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export function startRumBatch(configuration, lifeCycle, telemetryEventObservable, reportError, pageExitObservable, sessionExpireObservable, createEncoder) {
|
|
4
|
-
var rumEncoder = createEncoder(EncoderStreamId.RUM);
|
|
5
|
-
// Both batches share the same retry queue and bandwidth limits.
|
|
6
|
-
var request = createHttpRequest(configuration.rumEndpoint, configuration.batchBytesLimit, configuration.retryMaxSize, reportError);
|
|
7
|
-
var flushRequestObservable = new Observable();
|
|
8
|
-
var immediateViewBatch;
|
|
9
|
-
var immediateViewEncoder;
|
|
10
|
-
var batch = startBatchWithReplica(configuration, {
|
|
11
|
-
endpoint: configuration.rumEndpoint,
|
|
12
|
-
request: request,
|
|
13
|
-
encoder: rumEncoder,
|
|
14
|
-
encoderFallback: rumEncoder.isAsync ? createIdentityEncoder : undefined
|
|
15
|
-
}, reportError, pageExitObservable, sessionExpireObservable);
|
|
16
|
-
var prepareUrgentFlushSubscription = batch.prepareUrgentFlushObservable.subscribe(function (event) {
|
|
17
|
-
return lifeCycle.notify(LifeCycleEventType.PAGE_EXITED, event);
|
|
18
|
-
});
|
|
19
|
-
var rumEventSubscription = lifeCycle.subscribe(LifeCycleEventType.RUM_EVENT_COLLECTED, function (serverRumEvent) {
|
|
20
|
-
if (serverRumEvent.type === RumEventType.VIEW) {
|
|
21
|
-
batch.upsert(serverRumEvent, serverRumEvent.view.id);
|
|
22
|
-
} else {
|
|
23
|
-
batch.add(serverRumEvent);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
function sendImmediateView(event, reason) {
|
|
27
|
-
if (!immediateViewBatch) {
|
|
28
|
-
immediateViewEncoder = createEncoder(EncoderStreamId.RUM_INITIAL_VIEW);
|
|
29
|
-
immediateViewBatch = startBatchWithReplica(configuration, {
|
|
30
|
-
request: request,
|
|
31
|
-
encoder: immediateViewEncoder,
|
|
32
|
-
encoderFallback: immediateViewEncoder.isAsync ? createIdentityEncoder : undefined,
|
|
33
|
-
flushRequestObservable: flushRequestObservable
|
|
34
|
-
}, reportError,
|
|
35
|
-
// The regular batch already owns the exit copy. Do not promote an
|
|
36
|
-
// older first version from this encoder's journal on the same exit.
|
|
37
|
-
new Observable(), sessionExpireObservable);
|
|
38
|
-
}
|
|
39
|
-
// Send initial and forced-session Views separately. The normal batch retains
|
|
40
|
-
// each View's latest version for its original deadline and exit beacon,
|
|
41
|
-
// including rapid routes whose first fetches have not completed yet.
|
|
42
|
-
immediateViewBatch.upsert(event, event.view.id);
|
|
43
|
-
flushRequestObservable.notify(reason);
|
|
44
|
-
}
|
|
45
|
-
var initialViewSubscription = lifeCycle.subscribe(LifeCycleEventType.RUM_VIEW_FIRST_COLLECTED, function (event) {
|
|
46
|
-
return sendImmediateView(event, 'view_created');
|
|
47
|
-
});
|
|
48
|
-
var forcedViewSubscription = lifeCycle.subscribe(LifeCycleEventType.RUM_VIEW_FORCED_COLLECTED, function (event) {
|
|
49
|
-
return sendImmediateView(event, 'session_forced');
|
|
50
|
-
});
|
|
51
|
-
var telemetrySubscription = telemetryEventObservable.subscribe(function (event) {
|
|
52
|
-
batch.add(event);
|
|
53
|
-
});
|
|
54
|
-
return {
|
|
55
|
-
flushObservable: batch.flushObservable,
|
|
56
|
-
add: batch.add,
|
|
57
|
-
upsert: batch.upsert,
|
|
58
|
-
stop: function stop() {
|
|
59
|
-
prepareUrgentFlushSubscription.unsubscribe();
|
|
60
|
-
rumEventSubscription.unsubscribe();
|
|
61
|
-
initialViewSubscription.unsubscribe();
|
|
62
|
-
forcedViewSubscription.unsubscribe();
|
|
63
|
-
telemetrySubscription.unsubscribe();
|
|
64
|
-
batch.stop();
|
|
65
|
-
if (immediateViewBatch) {
|
|
66
|
-
immediateViewBatch.stop();
|
|
67
|
-
if (immediateViewEncoder.stop) {
|
|
68
|
-
immediateViewEncoder.stop();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=startRumBatch.js.map
|
|
1
|
+
import{createIdentityEncoder,createHttpRequest,LifeCycleEventType,Observable,RumEventType,startBatchWithReplica}from"@cloudcare/browser-core";import{EncoderStreamId}from"../domain/encoderStreamId";export function startRumBatch(configuration,lifeCycle,telemetryEventObservable,reportError,pageExitObservable,sessionExpireObservable,createEncoder){var immediateViewBatch,immediateViewEncoder,rumEncoder=createEncoder(EncoderStreamId.RUM),request=createHttpRequest(configuration.rumEndpoint,configuration.batchBytesLimit,configuration.retryMaxSize,reportError),flushRequestObservable=new Observable,batch=startBatchWithReplica(configuration,{endpoint:configuration.rumEndpoint,request:request,encoder:rumEncoder,encoderFallback:rumEncoder.isAsync?createIdentityEncoder:void 0},reportError,pageExitObservable,sessionExpireObservable),prepareUrgentFlushSubscription=batch.prepareUrgentFlushObservable.subscribe((function(event){return lifeCycle.notify(LifeCycleEventType.PAGE_EXITED,event)})),rumEventSubscription=lifeCycle.subscribe(LifeCycleEventType.RUM_EVENT_COLLECTED,(function(serverRumEvent){serverRumEvent.type===RumEventType.VIEW?batch.upsert(serverRumEvent,serverRumEvent.view.id):batch.add(serverRumEvent)}));function sendImmediateView(event,reason){immediateViewBatch||(immediateViewEncoder=createEncoder(EncoderStreamId.RUM_INITIAL_VIEW),immediateViewBatch=startBatchWithReplica(configuration,{request:request,encoder:immediateViewEncoder,encoderFallback:immediateViewEncoder.isAsync?createIdentityEncoder:void 0,flushRequestObservable:flushRequestObservable},reportError,new Observable,sessionExpireObservable)),immediateViewBatch.upsert(event,event.view.id),flushRequestObservable.notify(reason)}var initialViewSubscription=lifeCycle.subscribe(LifeCycleEventType.RUM_VIEW_FIRST_COLLECTED,(function(event){return sendImmediateView(event,"view_created")})),forcedViewSubscription=lifeCycle.subscribe(LifeCycleEventType.RUM_VIEW_FORCED_COLLECTED,(function(event){return sendImmediateView(event,"session_forced")})),telemetrySubscription=telemetryEventObservable.subscribe((function(event){batch.add(event)}));return{flushObservable:batch.flushObservable,add:batch.add,upsert:batch.upsert,stop:function stop(){prepareUrgentFlushSubscription.unsubscribe(),rumEventSubscription.unsubscribe(),initialViewSubscription.unsubscribe(),forcedViewSubscription.unsubscribe(),telemetrySubscription.unsubscribe(),batch.stop(),immediateViewBatch&&(immediateViewBatch.stop(),immediateViewEncoder.stop&&immediateViewEncoder.stop())}}}
|
|
2
|
+
//# sourceMappingURL=startRumBatch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startRumBatch.js","names":["createIdentityEncoder","createHttpRequest","LifeCycleEventType","Observable","RumEventType","startBatchWithReplica","EncoderStreamId","startRumBatch","configuration","lifeCycle","telemetryEventObservable","reportError","pageExitObservable","sessionExpireObservable","createEncoder","rumEncoder","RUM","request","rumEndpoint","batchBytesLimit","retryMaxSize","flushRequestObservable","
|
|
1
|
+
{"version":3,"file":"startRumBatch.js","names":["createIdentityEncoder","createHttpRequest","LifeCycleEventType","Observable","RumEventType","startBatchWithReplica","EncoderStreamId","startRumBatch","configuration","lifeCycle","telemetryEventObservable","reportError","pageExitObservable","sessionExpireObservable","createEncoder","immediateViewBatch","immediateViewEncoder","rumEncoder","RUM","request","rumEndpoint","batchBytesLimit","retryMaxSize","flushRequestObservable","batch","endpoint","encoder","encoderFallback","isAsync","undefined","prepareUrgentFlushSubscription","prepareUrgentFlushObservable","subscribe","event","notify","PAGE_EXITED","rumEventSubscription","RUM_EVENT_COLLECTED","serverRumEvent","type","VIEW","upsert","view","id","add","sendImmediateView","reason","RUM_INITIAL_VIEW","initialViewSubscription","RUM_VIEW_FIRST_COLLECTED","forcedViewSubscription","RUM_VIEW_FORCED_COLLECTED","telemetrySubscription","flushObservable","stop","unsubscribe"],"sources":["../../src/transport/startRumBatch.js"],"mappings":"OACEA,sBACAC,kBACAC,mBACAC,WACAC,aACAC,0BACK,iCACEC,oBAAuB,mCACzB,SAASC,cACdC,cACAC,UACAC,yBACAC,YACAC,mBACAC,wBACAC,eAEA,IASIC,mBACAC,qBAVEC,WAAaH,cAAcR,gBAAgBY,KAE3CC,QAAUlB,kBACdO,cAAcY,YACdZ,cAAca,gBACdb,cAAcc,aACdX,aAEIY,uBAAyB,IAAIpB,WAG7BqB,MAAQnB,sBACZG,cACA,CACEiB,SAAUjB,cAAcY,YACxBD,gBACAO,QAAST,WACTU,gBAAiBV,WAAWW,QACxB5B,2BACA6B,GAENlB,YACAC,mBACAC,yBAEIiB,+BAAiCN,MAAMO,6BAA6BC,WACxE,SAAAC,OAAK,OAAIxB,UAAUyB,OAAOhC,mBAAmBiC,YAAaF,MAAM,IAE5DG,qBAAuB3B,UAAUuB,UACrC9B,mBAAmBmC,qBACnB,SAAUC,gBACJA,eAAeC,OAASnC,aAAaoC,KACvChB,MAAMiB,OAAOH,eAAgBA,eAAeI,KAAKC,IAEjDnB,MAAMoB,IAAIN,eAEd,IAEF,SAASO,kBAAkBZ,MAAOa,QAC3B/B,qBACHC,qBAAuBF,cAAcR,gBAAgByC,kBACrDhC,mBAAqBV,sBACnBG,cACA,CACEW,gBACAO,QAASV,qBACTW,gBAAiBX,qBAAqBY,QAClC5B,2BACA6B,EACJN,+CAEFZ,YAGA,IAAIR,WACJU,0BAMJE,mBAAmB0B,OAAOR,MAAOA,MAAMS,KAAKC,IAC5CpB,uBAAuBW,OAAOY,OAChC,CACA,IAAME,wBAA0BvC,UAAUuB,UACxC9B,mBAAmB+C,0BACnB,SAAAhB,OAAK,OAAIY,kBAAkBZ,MAAO,eAAe,IAE7CiB,uBAAyBzC,UAAUuB,UACvC9B,mBAAmBiD,2BACnB,SAAAlB,OAAK,OAAIY,kBAAkBZ,MAAO,iBAAiB,IAE/CmB,sBAAwB1C,yBAAyBsB,WAAU,SAAUC,OACzET,MAAMoB,IAAIX,MACZ,IACA,MAAO,CACLoB,gBAAiB7B,MAAM6B,gBACvBT,IAAKpB,MAAMoB,IACXH,OAAQjB,MAAMiB,OACda,KAAM,SAANA,OACExB,+BAA+ByB,cAC/BnB,qBAAqBmB,cACrBP,wBAAwBO,cACxBL,uBAAuBK,cACvBH,sBAAsBG,cACtB/B,MAAM8B,OACFvC,qBACFA,mBAAmBuC,OACftC,qBAAqBsC,MACvBtC,qBAAqBsC,OAG3B,EAEJ","ignoreList":[]}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var bridge = getEventBridge();
|
|
4
|
-
lifeCycle.subscribe(LifeCycleEventType.RUM_EVENT_COLLECTED, function (serverRumEvent) {
|
|
5
|
-
var data = processedMessageByDataMap(serverRumEvent).rowData;
|
|
6
|
-
bridge.send('rum', data);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=startRumEventBridge.js.map
|
|
1
|
+
import{getEventBridge,LifeCycleEventType,processedMessageByDataMap}from"@cloudcare/browser-core";export function startRumEventBridge(lifeCycle){var bridge=getEventBridge();lifeCycle.subscribe(LifeCycleEventType.RUM_EVENT_COLLECTED,(function(serverRumEvent){var data=processedMessageByDataMap(serverRumEvent).rowData;bridge.send("rum",data)}))}
|
|
2
|
+
//# sourceMappingURL=startRumEventBridge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startRumEventBridge.js","names":["getEventBridge","LifeCycleEventType","processedMessageByDataMap","startRumEventBridge","lifeCycle","bridge","subscribe","RUM_EVENT_COLLECTED","serverRumEvent","data","rowData","send"],"sources":["../../src/transport/startRumEventBridge.js"],"mappings":"
|
|
1
|
+
{"version":3,"file":"startRumEventBridge.js","names":["getEventBridge","LifeCycleEventType","processedMessageByDataMap","startRumEventBridge","lifeCycle","bridge","subscribe","RUM_EVENT_COLLECTED","serverRumEvent","data","rowData","send"],"sources":["../../src/transport/startRumEventBridge.js"],"mappings":"OACEA,eACAC,mBACAC,8BACK,iCAEA,SAASC,oBAAoBC,WAClC,IAAIC,OAASL,iBAEbI,UAAUE,UACRL,mBAAmBM,qBACnB,SAAUC,gBACR,IAAIC,KAAOP,0BAA0BM,gBAAgBE,QACrDL,OAAOM,KAAK,MAAOF,KACrB,GAEJ","ignoreList":[]}
|
package/esm/types/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export*from"./sessionReplayConstants";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/esm/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/types/index.js"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["from"],"sources":["../../src/types/index.js"],"mappings":"MAAAA,KAAc","ignoreList":[]}
|
|
@@ -1,46 +1,2 @@
|
|
|
1
|
-
export var RecordType = {
|
|
2
|
-
|
|
3
|
-
IncrementalSnapshot: 3,
|
|
4
|
-
Meta: 4,
|
|
5
|
-
Focus: 6,
|
|
6
|
-
ViewEnd: 7,
|
|
7
|
-
VisualViewport: 8,
|
|
8
|
-
FrustrationRecord: 9
|
|
9
|
-
};
|
|
10
|
-
export var NodeType = {
|
|
11
|
-
Document: 0,
|
|
12
|
-
DocumentType: 1,
|
|
13
|
-
Element: 2,
|
|
14
|
-
Text: 3,
|
|
15
|
-
CDATA: 4,
|
|
16
|
-
DocumentFragment: 11
|
|
17
|
-
};
|
|
18
|
-
export var IncrementalSource = {
|
|
19
|
-
Mutation: 0,
|
|
20
|
-
MouseMove: 1,
|
|
21
|
-
MouseInteraction: 2,
|
|
22
|
-
Scroll: 3,
|
|
23
|
-
ViewportResize: 4,
|
|
24
|
-
Input: 5,
|
|
25
|
-
TouchMove: 6,
|
|
26
|
-
MediaInteraction: 7,
|
|
27
|
-
StyleSheetRule: 8,
|
|
28
|
-
CanvasMutation: 9
|
|
29
|
-
// Font : 10,
|
|
30
|
-
};
|
|
31
|
-
export var MouseInteractionType = {
|
|
32
|
-
MouseUp: 0,
|
|
33
|
-
MouseDown: 1,
|
|
34
|
-
Click: 2,
|
|
35
|
-
ContextMenu: 3,
|
|
36
|
-
DblClick: 4,
|
|
37
|
-
Focus: 5,
|
|
38
|
-
Blur: 6,
|
|
39
|
-
TouchStart: 7,
|
|
40
|
-
TouchEnd: 9
|
|
41
|
-
};
|
|
42
|
-
export var MediaInteractionType = {
|
|
43
|
-
Play: 0,
|
|
44
|
-
Pause: 1
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=sessionReplayConstants.js.map
|
|
1
|
+
export var RecordType={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9};export var NodeType={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11};export var IncrementalSource={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8,CanvasMutation:9};export var MouseInteractionType={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9};export var MediaInteractionType={Play:0,Pause:1};
|
|
2
|
+
//# sourceMappingURL=sessionReplayConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionReplayConstants.js","names":["RecordType","FullSnapshot","IncrementalSnapshot","Meta","Focus","ViewEnd","VisualViewport","FrustrationRecord","NodeType","Document","DocumentType","Element","Text","CDATA","DocumentFragment","IncrementalSource","Mutation","MouseMove","MouseInteraction","Scroll","ViewportResize","Input","TouchMove","MediaInteraction","StyleSheetRule","CanvasMutation","MouseInteractionType","MouseUp","MouseDown","Click","ContextMenu","DblClick","Blur","TouchStart","TouchEnd","MediaInteractionType","Play","Pause"],"sources":["../../src/types/sessionReplayConstants.js"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sessionReplayConstants.js","names":["RecordType","FullSnapshot","IncrementalSnapshot","Meta","Focus","ViewEnd","VisualViewport","FrustrationRecord","NodeType","Document","DocumentType","Element","Text","CDATA","DocumentFragment","IncrementalSource","Mutation","MouseMove","MouseInteraction","Scroll","ViewportResize","Input","TouchMove","MediaInteraction","StyleSheetRule","CanvasMutation","MouseInteractionType","MouseUp","MouseDown","Click","ContextMenu","DblClick","Blur","TouchStart","TouchEnd","MediaInteractionType","Play","Pause"],"sources":["../../src/types/sessionReplayConstants.js"],"mappings":"OAAO,IAAIA,WAAa,CACtBC,aAAc,EACdC,oBAAqB,EACrBC,KAAM,EACNC,MAAO,EACPC,QAAS,EACTC,eAAgB,EAChBC,kBAAmB,UAGd,IAAIC,SAAW,CACpBC,SAAU,EACVC,aAAc,EACdC,QAAS,EACTC,KAAM,EACNC,MAAO,EACPC,iBAAkB,WAGb,IAAIC,kBAAoB,CAC7BC,SAAU,EACVC,UAAW,EACXC,iBAAkB,EAClBC,OAAQ,EACRC,eAAgB,EAChBC,MAAO,EACPC,UAAW,EACXC,iBAAkB,EAClBC,eAAgB,EAChBC,eAAgB,UAIX,IAAIC,qBAAuB,CAChCC,QAAS,EACTC,UAAW,EACXC,MAAO,EACPC,YAAa,EACbC,SAAU,EACV3B,MAAO,EACP4B,KAAM,EACNC,WAAY,EACZC,SAAU,UAGL,IAAIC,qBAAuB,CAChCC,KAAM,EACNC,MAAO","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcare/browser-rum",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.25",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@cloudcare/browser-core": "3.3.
|
|
9
|
-
"@cloudcare/browser-worker": "3.3.
|
|
8
|
+
"@cloudcare/browser-core": "3.3.25",
|
|
9
|
+
"@cloudcare/browser-worker": "3.3.25"
|
|
10
10
|
},
|
|
11
11
|
"description": "Guance Browser SDK RUM Package",
|
|
12
12
|
"browserSdkCapabilities": {
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"dev": "webpack serve --open --mode=development",
|
|
17
17
|
"build": "run-s build:cjs build:esm build:bundle",
|
|
18
18
|
"build:cjs": "rm -rf cjs && babel --config-file ./babel.cjs.json --out-dir cjs ./src && npm run replace-build-env cjs && node ../../scripts/strip-source-map-sources-content.js cjs",
|
|
19
|
-
"build:esm": "rm -rf esm && babel --config-file ./babel.esm.json --out-dir esm ./src && npm run replace-build-env esm && node ../../scripts/strip-source-map-sources-content.js esm",
|
|
20
|
-
"build:bundle": "rm -rf bundle && webpack --mode=production && npm run check:bundle-size && npm run check:bundle-contract",
|
|
21
|
-
"check:bundle-size": "node ../../scripts/check-bundle-size.js bundle/dataflux-rum.js",
|
|
22
|
-
"check:bundle-contract": "node ../../scripts/check-bundle-property-contract.js bundle/dataflux-rum.js rum && node ../../scripts/check-rum-webgl-boundary.js bundle/dataflux-rum.js",
|
|
19
|
+
"build:esm": "rm -rf esm && babel --config-file ./babel.esm.json --out-dir esm ./src && npm run replace-build-env esm && node ../../scripts/optimize-esm.js esm && node ../../scripts/strip-source-map-sources-content.js esm",
|
|
20
|
+
"build:bundle": "rm -rf bundle && webpack --mode=production && webpack --mode=production --env domOnly && npm run check:bundle-size && npm run check:bundle-contract",
|
|
21
|
+
"check:bundle-size": "node ../../scripts/check-bundle-size.js bundle/dataflux-rum.js && node ../../scripts/check-bundle-size.js bundle/dataflux-rum-dom.js dom",
|
|
22
|
+
"check:bundle-contract": "node ../../scripts/check-bundle-property-contract.js bundle/dataflux-rum.js rum && node ../../scripts/check-bundle-property-contract.js bundle/dataflux-rum-dom.js rum && node ../../scripts/check-rum-webgl-boundary.js bundle/dataflux-rum.js",
|
|
23
23
|
"replace-build-env": "node ../../scripts/replace-build-env.js",
|
|
24
24
|
"publish:oss:current": "npm run build:bundle && node ./scripts/publish-oss.js current",
|
|
25
25
|
"publish:oss:lts": "npm run build:bundle && node ./scripts/publish-oss.js lts",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"author": "dataflux",
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"homepage": "https://github.com/GuanceCloud/datakit-js/README.md",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "18fd0d6c18b13e632048d3917b71d2c04811830a"
|
|
45
45
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// A construction failure happens before init(), so its monitor cannot help.
|
|
2
2
|
// Keep this fallback free of runtime collectors and browser instrumentation.
|
|
3
|
+
import { reportInitError } from './initCallbacks'
|
|
4
|
+
|
|
3
5
|
export function makeDisabledRumPublicApi(withReplay) {
|
|
4
6
|
function noop() {}
|
|
5
7
|
function emptyContext() { return {} }
|
|
@@ -31,6 +33,9 @@ export function makeDisabledRumPublicApi(withReplay) {
|
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
methods.forEach(function (name) { api[name] = noop })
|
|
36
|
+
api.init = function (configuration) {
|
|
37
|
+
reportInitError(configuration, 'sdk_disabled', 'RUM is disabled because SDK construction failed.')
|
|
38
|
+
}
|
|
34
39
|
api.getGlobalContext = api.getRumGlobalContext = api.getViewContext = api.getUser = emptyContext
|
|
35
40
|
api.createResourceTrackerId = function () { return '' }
|
|
36
41
|
api.getRemoteConfiguration = noop
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { catchUserErrors, displayAlreadyInitializedError, getType } from '@cloudcare/browser-core'
|
|
2
|
+
|
|
3
|
+
export function callInitCallback(configuration, name, result) {
|
|
4
|
+
if (configuration && getType(configuration[name]) === 'function') {
|
|
5
|
+
catchUserErrors(configuration[name], name + ' callback threw an error:')(result)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function reportInitError(configuration, code, message) {
|
|
10
|
+
callInitCallback(configuration, 'onInitError', { code: code, message: message })
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function reportAlreadyInitialized(configuration) {
|
|
14
|
+
displayAlreadyInitializedError('DATAFLUX_RUM', configuration)
|
|
15
|
+
reportInitError(configuration, 'already_initialized', 'RUM is already initialized or initialization is in progress.')
|
|
16
|
+
}
|
package/src/boot/perStartRum.js
CHANGED
|
@@ -2,7 +2,8 @@ import {
|
|
|
2
2
|
createBoundedBuffer,
|
|
3
3
|
display,
|
|
4
4
|
canUseEventBridge,
|
|
5
|
-
|
|
5
|
+
catchUserErrors,
|
|
6
|
+
monitorError,
|
|
6
7
|
willSyntheticsInjectRum,
|
|
7
8
|
noop,
|
|
8
9
|
timeStampNow,
|
|
@@ -15,8 +16,9 @@ import {
|
|
|
15
16
|
getEventBridge,
|
|
16
17
|
getType
|
|
17
18
|
} from '@cloudcare/browser-core'
|
|
18
|
-
import { validateAndBuildRumConfiguration } from '../domain/configuration'
|
|
19
|
+
import { prepareReplayCanvasConfiguration, validateAndBuildRumConfiguration } from '../domain/configuration'
|
|
19
20
|
import { getPluginsTelemetry, validatePlugins } from '../domain/plugins'
|
|
21
|
+
import { callInitCallback, reportInitError, reportAlreadyInitialized } from './initCallbacks'
|
|
20
22
|
|
|
21
23
|
export function createPreStartStrategy(
|
|
22
24
|
rumPublicApiOptions,
|
|
@@ -28,7 +30,7 @@ export function createPreStartStrategy(
|
|
|
28
30
|
var startCompressionWorker = rumPublicApiOptions.startCompressionWorker
|
|
29
31
|
var overrideInitConfiguration = rumPublicApiOptions.overrideInitConfiguration
|
|
30
32
|
var bufferApiCalls = createBoundedBuffer()
|
|
31
|
-
var
|
|
33
|
+
var remoteConfigurationCallbacks = createBoundedBuffer()
|
|
32
34
|
var firstStartViewCall
|
|
33
35
|
|
|
34
36
|
var compressionWorker
|
|
@@ -37,11 +39,11 @@ export function createPreStartStrategy(
|
|
|
37
39
|
var cachedConfiguration
|
|
38
40
|
var cachedRemoteConfiguration
|
|
39
41
|
var hasStarted
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
+
var pendingAttempt
|
|
43
|
+
var workerFailed = false
|
|
42
44
|
var resourceTrackerManager = rumPublicApiOptions.resourceTrackerManager
|
|
43
45
|
function tryStartRum() {
|
|
44
|
-
if (hasStarted || !cachedInitConfiguration || !cachedConfiguration) {
|
|
46
|
+
if (hasStarted || workerFailed || !cachedInitConfiguration || !cachedConfiguration) {
|
|
45
47
|
return
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -61,17 +63,35 @@ export function createPreStartStrategy(
|
|
|
61
63
|
initialViewOptions = firstStartViewCall.options
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
hasStarted = true
|
|
64
67
|
var startRumResult = doStartRum(
|
|
65
68
|
cachedConfiguration,
|
|
66
69
|
compressionWorker,
|
|
67
70
|
initialViewOptions
|
|
68
71
|
)
|
|
69
|
-
hasStarted = true
|
|
70
72
|
|
|
71
73
|
bufferApiCalls.drain(startRumResult)
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
function
|
|
76
|
+
function fail(attempt, code, message) {
|
|
77
|
+
if (pendingAttempt !== attempt) return
|
|
78
|
+
attempt.$rConfigurationReadyCallbacks = undefined
|
|
79
|
+
pendingAttempt = undefined
|
|
80
|
+
if (code === 'worker_initialization_failed') workerFailed = true
|
|
81
|
+
reportInitError(attempt, code, message)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function run(attempt, callback) {
|
|
85
|
+
if (pendingAttempt !== attempt) return
|
|
86
|
+
try {
|
|
87
|
+
callback()
|
|
88
|
+
} catch (error) {
|
|
89
|
+
fail(attempt, 'initialization_failed', 'An error occurred while initializing RUM.')
|
|
90
|
+
monitorError(error)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function doInit(attempt, initConfiguration, remoteConfiguration, remoteError) {
|
|
75
95
|
var eventBridgeAvailable = canUseEventBridge()
|
|
76
96
|
if (eventBridgeAvailable) {
|
|
77
97
|
initConfiguration = overrideInitConfigurationForBridge(initConfiguration)
|
|
@@ -83,11 +103,7 @@ export function createPreStartStrategy(
|
|
|
83
103
|
// Update the exposed initConfiguration to reflect the bridge and remote configuration overrides
|
|
84
104
|
cachedInitConfiguration = initConfiguration
|
|
85
105
|
cachedRemoteConfiguration = remoteConfiguration
|
|
86
|
-
|
|
87
|
-
if (cachedConfiguration) {
|
|
88
|
-
displayAlreadyInitializedError('DATAFLUX_RUM', initConfiguration)
|
|
89
|
-
return
|
|
90
|
-
}
|
|
106
|
+
remoteConfigurationCallbacks.drain(cachedRemoteConfiguration)
|
|
91
107
|
var telemetryConfiguration = deepClone(initConfiguration)
|
|
92
108
|
if (initConfiguration.plugins) {
|
|
93
109
|
telemetryConfiguration.plugins = getPluginsTelemetry(
|
|
@@ -97,7 +113,7 @@ export function createPreStartStrategy(
|
|
|
97
113
|
addTelemetryConfiguration(telemetryConfiguration)
|
|
98
114
|
var configuration = validateAndBuildRumConfiguration(initConfiguration)
|
|
99
115
|
if (!configuration) {
|
|
100
|
-
|
|
116
|
+
fail(attempt, 'invalid_configuration', 'Invalid RUM configuration.')
|
|
101
117
|
return
|
|
102
118
|
}
|
|
103
119
|
|
|
@@ -109,48 +125,71 @@ export function createPreStartStrategy(
|
|
|
109
125
|
display.warn(
|
|
110
126
|
'No storage available for session. We will not send any data.'
|
|
111
127
|
)
|
|
112
|
-
|
|
128
|
+
fail(attempt, 'storage_unavailable', 'No storage available for the RUM session.')
|
|
113
129
|
return
|
|
114
130
|
}
|
|
115
131
|
|
|
132
|
+
var prepared = false
|
|
133
|
+
var workerReady = true
|
|
134
|
+
function notifyIfReady() {
|
|
135
|
+
if (!prepared || !workerReady || pendingAttempt !== attempt) return
|
|
136
|
+
pendingAttempt = undefined
|
|
137
|
+
const result = { remoteConfiguration: 'disabled' }
|
|
138
|
+
if (remoteError) {
|
|
139
|
+
result.remoteConfiguration = 'fallback'
|
|
140
|
+
result.remoteConfigurationError = remoteError
|
|
141
|
+
} else if (remoteConfiguration !== undefined) {
|
|
142
|
+
result.remoteConfiguration = 'applied'
|
|
143
|
+
}
|
|
144
|
+
callInitCallback(attempt, 'onInitSuccess', result)
|
|
145
|
+
}
|
|
146
|
+
|
|
116
147
|
if (
|
|
117
148
|
configuration.compressIntakeRequests &&
|
|
118
149
|
!configuration.sendContentTypeByJson &&
|
|
119
150
|
!eventBridgeAvailable &&
|
|
120
151
|
startCompressionWorker
|
|
121
152
|
) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
'RUM'
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
)
|
|
130
|
-
if (!compressionWorker) {
|
|
131
|
-
|
|
132
|
-
initializationPending = false
|
|
153
|
+
workerReady = false
|
|
154
|
+
function onWorkerError(reason) {
|
|
155
|
+
fail(attempt, 'worker_initialization_failed', reason || 'Unable to create the RUM compression Worker.')
|
|
156
|
+
}
|
|
157
|
+
compressionWorker = startCompressionWorker(configuration, 'RUM', onWorkerError, undefined, function () {
|
|
158
|
+
workerReady = true
|
|
159
|
+
notifyIfReady()
|
|
160
|
+
})
|
|
161
|
+
if (!compressionWorker || workerFailed) {
|
|
162
|
+
onWorkerError()
|
|
133
163
|
return
|
|
134
164
|
}
|
|
135
165
|
}
|
|
136
166
|
|
|
167
|
+
// Let plugins queue the initial manual View before collection starts.
|
|
168
|
+
const callbacks = attempt.$rConfigurationReadyCallbacks
|
|
169
|
+
attempt.$rConfigurationReadyCallbacks = undefined
|
|
170
|
+
callbacks.forEach(function (callback) {
|
|
171
|
+
catchUserErrors(callback, 'Plugin configuration callback threw an error:')()
|
|
172
|
+
})
|
|
137
173
|
cachedConfiguration = configuration
|
|
138
|
-
|
|
139
|
-
// Instrumuent fetch to track network requests
|
|
140
|
-
// This is needed in case the consent is not granted and some cutsomer
|
|
141
|
-
// library (Apollo Client) is storing uninstrumented fetch to be used later
|
|
142
|
-
// The subscrption is needed so that the instrumentation process is completed
|
|
174
|
+
// Instrument fetch before returning so libraries can cache the wrapped function.
|
|
143
175
|
initFetchObservable().subscribe(noop)
|
|
144
176
|
tryStartRum()
|
|
177
|
+
// The handshake gates the notification. Collection starts as soon as the Worker exists.
|
|
178
|
+
prepared = true
|
|
179
|
+
notifyIfReady()
|
|
145
180
|
}
|
|
146
181
|
|
|
147
182
|
return {
|
|
148
183
|
init: function (initConfiguration, publicApi) {
|
|
184
|
+
if (workerFailed) return
|
|
149
185
|
if (!initConfiguration) {
|
|
150
186
|
display.error('Missing configuration')
|
|
151
187
|
return
|
|
152
188
|
}
|
|
153
|
-
|
|
189
|
+
if (pendingAttempt || cachedConfiguration) {
|
|
190
|
+
reportAlreadyInitialized(initConfiguration)
|
|
191
|
+
return
|
|
192
|
+
}
|
|
154
193
|
|
|
155
194
|
// If we are in a Synthetics test configured to automatically inject a RUM instance, we want
|
|
156
195
|
// to completely discard the customer application RUM instance by ignoring their init() call.
|
|
@@ -158,37 +197,40 @@ export function createPreStartStrategy(
|
|
|
158
197
|
// internal `ignoreInitIfSyntheticsWillInjectRum` option is here to bypass this condition.
|
|
159
198
|
if (ignoreInitIfSyntheticsWillInjectRum && willSyntheticsInjectRum()) {
|
|
160
199
|
cachedInitConfiguration = initConfiguration
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
if (initializationPending || cachedConfiguration) {
|
|
164
|
-
displayAlreadyInitializedError('DATAFLUX_RUM', initConfiguration)
|
|
200
|
+
reportInitError(initConfiguration, 'initialization_ignored', 'RUM initialization was delegated to Synthetics.')
|
|
165
201
|
return
|
|
166
202
|
}
|
|
167
203
|
// Expose the accepted configuration regardless of initialization success.
|
|
204
|
+
initConfiguration = prepareReplayCanvasConfiguration(initConfiguration)
|
|
168
205
|
cachedInitConfiguration = initConfiguration
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (rumPublicApiOptions.onInit) {
|
|
174
|
-
rumPublicApiOptions.onInit(initConfiguration, publicApi)
|
|
175
|
-
}
|
|
176
|
-
pluginsRequireManualViewTracking =
|
|
177
|
-
!!initConfiguration.plugins &&
|
|
178
|
-
initConfiguration.trackViewsManually === true
|
|
179
|
-
if (initConfiguration.remoteConfiguration) {
|
|
180
|
-
fetchAndApplyRemoteConfiguration(
|
|
181
|
-
initConfiguration,
|
|
182
|
-
function (remoteInitConfiguration, remoteConfiguration) {
|
|
183
|
-
if (pluginsRequireManualViewTracking) {
|
|
184
|
-
remoteInitConfiguration.trackViewsManually = true
|
|
185
|
-
}
|
|
186
|
-
doInit(remoteInitConfiguration, remoteConfiguration)
|
|
187
|
-
}
|
|
188
|
-
)
|
|
189
|
-
} else {
|
|
190
|
-
doInit(initConfiguration)
|
|
206
|
+
const attempt = pendingAttempt = {
|
|
207
|
+
onInitSuccess: initConfiguration.onInitSuccess,
|
|
208
|
+
onInitError: initConfiguration.onInitError,
|
|
209
|
+
$rConfigurationReadyCallbacks: []
|
|
191
210
|
}
|
|
211
|
+
run(attempt, function () {
|
|
212
|
+
if (!validatePlugins(initConfiguration.plugins)) {
|
|
213
|
+
fail(attempt, 'invalid_plugins', 'Invalid RUM plugins configuration.')
|
|
214
|
+
return
|
|
215
|
+
}
|
|
216
|
+
if (rumPublicApiOptions.onInit) {
|
|
217
|
+
rumPublicApiOptions.onInit(initConfiguration, publicApi, function (callback) {
|
|
218
|
+
if (attempt.$rConfigurationReadyCallbacks) attempt.$rConfigurationReadyCallbacks.push(callback)
|
|
219
|
+
})
|
|
220
|
+
}
|
|
221
|
+
const pluginsRequireManualViewTracking =
|
|
222
|
+
!!initConfiguration.plugins && initConfiguration.trackViewsManually === true
|
|
223
|
+
if (initConfiguration.remoteConfiguration) {
|
|
224
|
+
fetchAndApplyRemoteConfiguration(initConfiguration, function (resolved, remote, error) {
|
|
225
|
+
run(attempt, function () {
|
|
226
|
+
if (pluginsRequireManualViewTracking) resolved.trackViewsManually = true
|
|
227
|
+
doInit(attempt, resolved, remote, error)
|
|
228
|
+
})
|
|
229
|
+
})
|
|
230
|
+
} else {
|
|
231
|
+
doInit(attempt, initConfiguration)
|
|
232
|
+
}
|
|
233
|
+
})
|
|
192
234
|
},
|
|
193
235
|
|
|
194
236
|
getInitConfiguration: function () {
|
|
@@ -196,10 +238,11 @@ export function createPreStartStrategy(
|
|
|
196
238
|
},
|
|
197
239
|
getRemoteConfiguration: function (callback) {
|
|
198
240
|
if (getType(callback) === 'function') {
|
|
241
|
+
callback = catchUserErrors(callback, 'getRemoteConfiguration callback threw an error:')
|
|
199
242
|
if (cachedRemoteConfiguration) {
|
|
200
243
|
callback(cachedRemoteConfiguration)
|
|
201
244
|
} else {
|
|
202
|
-
|
|
245
|
+
remoteConfigurationCallbacks.add(callback)
|
|
203
246
|
}
|
|
204
247
|
}
|
|
205
248
|
},
|