@cloudcare/browser-rum 3.1.10 → 3.1.12
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 +1 -1
- package/cjs/boot/buildEnv.js.map +1 -1
- package/cjs/boot/recorderApi.js +5 -0
- package/cjs/boot/recorderApi.js.map +1 -1
- package/cjs/boot/rum.entry.js.map +1 -1
- package/cjs/boot/rum.js.map +1 -1
- package/cjs/boot/rumPublicApi.js.map +1 -1
- package/cjs/boot/startRecording.js.map +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/domain/assembly.js.map +1 -1
- package/cjs/domain/configuration.js.map +1 -1
- package/cjs/domain/contexts/commonContext.js.map +1 -1
- package/cjs/domain/contexts/displayContext.js.map +1 -1
- package/cjs/domain/contexts/foregroundContexts.js.map +1 -1
- package/cjs/domain/contexts/internalContext.js.map +1 -1
- package/cjs/domain/contexts/pageStateHistory.js.map +1 -1
- package/cjs/domain/contexts/urlContexts.js +4 -4
- package/cjs/domain/contexts/urlContexts.js.map +1 -1
- package/cjs/domain/contexts/viewContexts.js +2 -2
- package/cjs/domain/contexts/viewContexts.js.map +1 -1
- package/cjs/domain/domMutationObservable.js.map +1 -1
- package/cjs/domain/initViewportObservable.js.map +1 -1
- package/cjs/domain/locationChangeObservable.js.map +1 -1
- package/cjs/domain/performanceCollection.js.map +1 -1
- package/cjs/domain/replay/deflate/deflateEncoder.js.map +1 -1
- package/cjs/domain/replay/deflate/deflateWorker.js +1 -1
- package/cjs/domain/replay/deflate/deflateWorker.js.map +1 -1
- package/cjs/domain/replay/deflate/index.js.map +1 -1
- package/cjs/domain/replay/record/elementsScrollPositions.js.map +1 -1
- package/cjs/domain/replay/record/index.js.map +1 -1
- package/cjs/domain/replay/record/mutationBatch.js.map +1 -1
- package/cjs/domain/replay/record/mutationObserver.js +11 -10
- package/cjs/domain/replay/record/mutationObserver.js.map +1 -1
- package/cjs/domain/replay/record/observers.js +18 -4
- package/cjs/domain/replay/record/observers.js.map +1 -1
- package/cjs/domain/replay/record/privacy.js +9 -2
- package/cjs/domain/replay/record/privacy.js.map +1 -1
- package/cjs/domain/replay/record/record.js.map +1 -1
- package/cjs/domain/replay/record/serializationUtils.js.map +1 -1
- package/cjs/domain/replay/record/serialize.js +9 -2
- package/cjs/domain/replay/record/serialize.js.map +1 -1
- package/cjs/domain/replay/record/shadowRootsController.js.map +1 -1
- package/cjs/domain/replay/record/utils.js.map +1 -1
- package/cjs/domain/replay/record/viewports.js.map +1 -1
- package/cjs/domain/replay/replayStats.js.map +1 -1
- package/cjs/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
- package/cjs/domain/replay/segmentCollection/index.js.map +1 -1
- package/cjs/domain/replay/segmentCollection/segment.js.map +1 -1
- package/cjs/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
- package/cjs/domain/requestCollection.js.map +1 -1
- package/cjs/domain/rumEventsCollection/actions/actionCollection.js.map +1 -1
- package/cjs/domain/rumEventsCollection/actions/clickChain.js.map +1 -1
- package/cjs/domain/rumEventsCollection/actions/computeFrustration.js +2 -2
- package/cjs/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -1
- package/cjs/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -1
- package/cjs/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -1
- package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js +9 -2
- package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -1
- package/cjs/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -1
- package/cjs/domain/rumEventsCollection/error/errorCollection.js.map +1 -1
- package/cjs/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -1
- package/cjs/domain/rumEventsCollection/error/trackReportError.js.map +1 -1
- package/cjs/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -1
- package/cjs/domain/rumEventsCollection/resource/matchRequestTiming.js.map +1 -1
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js +4 -2
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
- package/cjs/domain/rumEventsCollection/resource/resourceUtils.js +35 -3
- package/cjs/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +3 -1
- package/cjs/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackFirstInput.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +1 -1
- package/cjs/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +6 -1
- package/cjs/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/trackViews.js +7 -2
- package/cjs/domain/rumEventsCollection/view/trackViews.js.map +1 -1
- package/cjs/domain/rumEventsCollection/view/viewCollection.js.map +1 -1
- package/cjs/domain/rumSessionManager.js.map +1 -1
- package/cjs/domain/tracing/ddtraceTracer.js.map +1 -1
- package/cjs/domain/tracing/getDocumentTraceId.js.map +1 -1
- package/cjs/domain/tracing/jaegerTracer.js.map +1 -1
- package/cjs/domain/tracing/skywalkingTracer.js.map +1 -1
- package/cjs/domain/tracing/traceIdentifier.js.map +1 -1
- package/cjs/domain/tracing/tracer.js.map +1 -1
- package/cjs/domain/tracing/w3cTraceParentTracer.js.map +1 -1
- package/cjs/domain/tracing/zipkinMultiTracer.js.map +1 -1
- package/cjs/domain/tracing/zipkinSingleTracer.js.map +1 -1
- package/cjs/domain/trackEventCounts.js.map +1 -1
- package/cjs/domain/usr/index.js.map +1 -1
- package/cjs/domain/waitPageActivityEnd.js.map +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/transport/startRumBatch.js.map +1 -1
- package/cjs/transport/startRumEventBridge.js.map +1 -1
- package/cjs/types/index.js.map +1 -1
- package/cjs/types/sessionReplayConstants.js.map +1 -1
- package/esm/boot/buildEnv.js +1 -1
- package/esm/boot/buildEnv.js.map +1 -1
- package/esm/boot/recorderApi.js +6 -1
- package/esm/boot/recorderApi.js.map +1 -1
- package/esm/boot/rum.entry.js.map +1 -1
- package/esm/boot/rum.js.map +1 -1
- package/esm/boot/rumPublicApi.js.map +1 -1
- package/esm/boot/startRecording.js.map +1 -1
- package/esm/constants.js.map +1 -1
- package/esm/domain/assembly.js.map +1 -1
- package/esm/domain/configuration.js.map +1 -1
- package/esm/domain/contexts/commonContext.js.map +1 -1
- package/esm/domain/contexts/displayContext.js.map +1 -1
- package/esm/domain/contexts/foregroundContexts.js.map +1 -1
- package/esm/domain/contexts/internalContext.js.map +1 -1
- package/esm/domain/contexts/pageStateHistory.js.map +1 -1
- package/esm/domain/contexts/urlContexts.js +4 -4
- package/esm/domain/contexts/urlContexts.js.map +1 -1
- package/esm/domain/contexts/viewContexts.js +2 -2
- package/esm/domain/contexts/viewContexts.js.map +1 -1
- package/esm/domain/domMutationObservable.js.map +1 -1
- package/esm/domain/initViewportObservable.js.map +1 -1
- package/esm/domain/locationChangeObservable.js.map +1 -1
- package/esm/domain/performanceCollection.js.map +1 -1
- package/esm/domain/replay/deflate/deflateEncoder.js.map +1 -1
- package/esm/domain/replay/deflate/deflateWorker.js +1 -1
- package/esm/domain/replay/deflate/deflateWorker.js.map +1 -1
- package/esm/domain/replay/deflate/index.js.map +1 -1
- package/esm/domain/replay/record/elementsScrollPositions.js.map +1 -1
- package/esm/domain/replay/record/index.js.map +1 -1
- package/esm/domain/replay/record/mutationBatch.js.map +1 -1
- package/esm/domain/replay/record/mutationObserver.js +11 -10
- package/esm/domain/replay/record/mutationObserver.js.map +1 -1
- package/esm/domain/replay/record/observers.js +18 -4
- package/esm/domain/replay/record/observers.js.map +1 -1
- package/esm/domain/replay/record/privacy.js +9 -2
- package/esm/domain/replay/record/privacy.js.map +1 -1
- package/esm/domain/replay/record/record.js.map +1 -1
- package/esm/domain/replay/record/serializationUtils.js.map +1 -1
- package/esm/domain/replay/record/serialize.js +10 -4
- package/esm/domain/replay/record/serialize.js.map +1 -1
- package/esm/domain/replay/record/shadowRootsController.js.map +1 -1
- package/esm/domain/replay/record/utils.js.map +1 -1
- package/esm/domain/replay/record/viewports.js.map +1 -1
- package/esm/domain/replay/replayStats.js.map +1 -1
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
- package/esm/domain/replay/segmentCollection/index.js.map +1 -1
- package/esm/domain/replay/segmentCollection/segment.js.map +1 -1
- package/esm/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
- package/esm/domain/requestCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/actionCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/clickChain.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js +2 -2
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js +9 -2
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/errorCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/trackReportError.js.map +1 -1
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/matchRequestTiming.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js +6 -4
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js +31 -2
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +3 -1
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstInput.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +1 -1
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +6 -1
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackViews.js +7 -2
- package/esm/domain/rumEventsCollection/view/trackViews.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/viewCollection.js.map +1 -1
- package/esm/domain/rumSessionManager.js.map +1 -1
- package/esm/domain/tracing/ddtraceTracer.js.map +1 -1
- package/esm/domain/tracing/getDocumentTraceId.js.map +1 -1
- package/esm/domain/tracing/jaegerTracer.js.map +1 -1
- package/esm/domain/tracing/skywalkingTracer.js.map +1 -1
- package/esm/domain/tracing/traceIdentifier.js.map +1 -1
- package/esm/domain/tracing/tracer.js.map +1 -1
- package/esm/domain/tracing/w3cTraceParentTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinMultiTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinSingleTracer.js.map +1 -1
- package/esm/domain/trackEventCounts.js.map +1 -1
- package/esm/domain/usr/index.js.map +1 -1
- package/esm/domain/waitPageActivityEnd.js.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/transport/startRumBatch.js.map +1 -1
- package/esm/transport/startRumEventBridge.js.map +1 -1
- package/esm/types/index.js.map +1 -1
- package/esm/types/sessionReplayConstants.js.map +1 -1
- package/package.json +4 -4
- package/src/boot/recorderApi.js +13 -2
- package/src/domain/contexts/urlContexts.js +4 -6
- package/src/domain/contexts/viewContexts.js +12 -8
- package/src/domain/replay/record/mutationObserver.js +27 -10
- package/src/domain/replay/record/observers.js +22 -12
- package/src/domain/replay/record/privacy.js +12 -2
- package/src/domain/replay/record/serialize.js +13 -9
- package/src/domain/rumEventsCollection/actions/computeFrustration.js +6 -2
- package/src/domain/rumEventsCollection/actions/listenActionEvents.js +12 -3
- package/src/domain/rumEventsCollection/resource/resourceCollection.js +9 -4
- package/src/domain/rumEventsCollection/resource/resourceUtils.js +33 -5
- package/src/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +5 -1
- package/src/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +4 -1
- package/src/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +6 -1
- package/src/domain/rumEventsCollection/view/trackViews.js +7 -3
|
@@ -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","MouseInteractionType","MouseUp","MouseDown","Click","ContextMenu","DblClick","Blur","TouchStart","TouchEnd","MediaInteractionType","Play","Pause"],"sources":["../../src/types/sessionReplayConstants.js"],"sourcesContent":["export var RecordType = {\n FullSnapshot: 2,\n IncrementalSnapshot: 3,\n Meta: 4,\n Focus: 6,\n ViewEnd: 7,\n VisualViewport: 8,\n FrustrationRecord: 9\n}\n\nexport var NodeType = {\n Document: 0,\n DocumentType: 1,\n Element: 2,\n Text: 3,\n CDATA: 4,\n DocumentFragment: 11\n}\n\nexport var IncrementalSource = {\n Mutation: 0,\n MouseMove: 1,\n MouseInteraction: 2,\n Scroll: 3,\n ViewportResize: 4,\n Input: 5,\n TouchMove: 6,\n MediaInteraction: 7,\n StyleSheetRule: 8\n // CanvasMutation : 9,\n // Font : 10,\n}\n\nexport var MouseInteractionType = {\n MouseUp: 0,\n MouseDown: 1,\n Click: 2,\n ContextMenu: 3,\n DblClick: 4,\n Focus: 5,\n Blur: 6,\n TouchStart: 7,\n TouchEnd: 9\n}\n\nexport var MediaInteractionType = {\n Play: 0,\n Pause: 1\n}\n"],"mappings":"AAAA,OAAO,IAAIA,UAAU,GAAG;EACtBC,YAAY,EAAE,CAAC;EACfC,mBAAmB,EAAE,CAAC;EACtBC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE,CAAC;EACRC,OAAO,EAAE,CAAC;EACVC,cAAc,EAAE,CAAC;EACjBC,iBAAiB,EAAE;AACrB,CAAC;AAED,OAAO,IAAIC,QAAQ,GAAG;EACpBC,QAAQ,EAAE,CAAC;EACXC,YAAY,EAAE,CAAC;EACfC,OAAO,EAAE,CAAC;EACVC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE,CAAC;EACRC,gBAAgB,EAAE;AACpB,CAAC;AAED,OAAO,IAAIC,iBAAiB,GAAG;EAC7BC,QAAQ,EAAE,CAAC;EACXC,SAAS,EAAE,CAAC;EACZC,gBAAgB,EAAE,CAAC;EACnBC,MAAM,EAAE,CAAC;EACTC,cAAc,EAAE,CAAC;EACjBC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,gBAAgB,EAAE,CAAC;EACnBC,cAAc,EAAE;EAChB;EACA;AACF,CAAC;;AAED,OAAO,IAAIC,oBAAoB,GAAG;EAChCC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE,CAAC;EACZC,KAAK,EAAE,CAAC;EACRC,WAAW,EAAE,CAAC;EACdC,QAAQ,EAAE,CAAC;EACX1B,KAAK,EAAE,CAAC;EACR2B,IAAI,EAAE,CAAC;EACPC,UAAU,EAAE,CAAC;EACbC,QAAQ,EAAE;AACZ,CAAC;AAED,OAAO,IAAIC,oBAAoB,GAAG;EAChCC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE;AACT,CAAC"}
|
|
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","MouseInteractionType","MouseUp","MouseDown","Click","ContextMenu","DblClick","Blur","TouchStart","TouchEnd","MediaInteractionType","Play","Pause"],"sources":["../../src/types/sessionReplayConstants.js"],"sourcesContent":["export var RecordType = {\n FullSnapshot: 2,\n IncrementalSnapshot: 3,\n Meta: 4,\n Focus: 6,\n ViewEnd: 7,\n VisualViewport: 8,\n FrustrationRecord: 9\n}\n\nexport var NodeType = {\n Document: 0,\n DocumentType: 1,\n Element: 2,\n Text: 3,\n CDATA: 4,\n DocumentFragment: 11\n}\n\nexport var IncrementalSource = {\n Mutation: 0,\n MouseMove: 1,\n MouseInteraction: 2,\n Scroll: 3,\n ViewportResize: 4,\n Input: 5,\n TouchMove: 6,\n MediaInteraction: 7,\n StyleSheetRule: 8\n // CanvasMutation : 9,\n // Font : 10,\n}\n\nexport var MouseInteractionType = {\n MouseUp: 0,\n MouseDown: 1,\n Click: 2,\n ContextMenu: 3,\n DblClick: 4,\n Focus: 5,\n Blur: 6,\n TouchStart: 7,\n TouchEnd: 9\n}\n\nexport var MediaInteractionType = {\n Play: 0,\n Pause: 1\n}\n"],"mappings":"AAAA,OAAO,IAAIA,UAAU,GAAG;EACtBC,YAAY,EAAE,CAAC;EACfC,mBAAmB,EAAE,CAAC;EACtBC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE,CAAC;EACRC,OAAO,EAAE,CAAC;EACVC,cAAc,EAAE,CAAC;EACjBC,iBAAiB,EAAE;AACrB,CAAC;AAED,OAAO,IAAIC,QAAQ,GAAG;EACpBC,QAAQ,EAAE,CAAC;EACXC,YAAY,EAAE,CAAC;EACfC,OAAO,EAAE,CAAC;EACVC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE,CAAC;EACRC,gBAAgB,EAAE;AACpB,CAAC;AAED,OAAO,IAAIC,iBAAiB,GAAG;EAC7BC,QAAQ,EAAE,CAAC;EACXC,SAAS,EAAE,CAAC;EACZC,gBAAgB,EAAE,CAAC;EACnBC,MAAM,EAAE,CAAC;EACTC,cAAc,EAAE,CAAC;EACjBC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,gBAAgB,EAAE,CAAC;EACnBC,cAAc,EAAE;EAChB;EACA;AACF,CAAC;;AAED,OAAO,IAAIC,oBAAoB,GAAG;EAChCC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE,CAAC;EACZC,KAAK,EAAE,CAAC;EACRC,WAAW,EAAE,CAAC;EACdC,QAAQ,EAAE,CAAC;EACX1B,KAAK,EAAE,CAAC;EACR2B,IAAI,EAAE,CAAC;EACPC,UAAU,EAAE,CAAC;EACbC,QAAQ,EAAE;AACZ,CAAC;AAED,OAAO,IAAIC,oBAAoB,GAAG;EAChCC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE;AACT,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcare/browser-rum",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.12",
|
|
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.1.
|
|
9
|
-
"@cloudcare/browser-worker": "3.1.
|
|
8
|
+
"@cloudcare/browser-core": "3.1.12",
|
|
9
|
+
"@cloudcare/browser-worker": "3.1.12"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"dev": "webpack serve --open --mode=development",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"homepage": "https://github.com/CloudCare/dataflux-rum-sdk-javascript/blob/master/packages/rum/README.md",
|
|
35
35
|
"description": "DataFlux RUM Web 端数据指标监控",
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "01fca1d8b95bbd1e8e7936bda860af98bf76fa02"
|
|
37
37
|
}
|
package/src/boot/recorderApi.js
CHANGED
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
LifeCycleEventType,
|
|
5
5
|
canUseEventBridge,
|
|
6
6
|
Observable,
|
|
7
|
-
relativeNow
|
|
7
|
+
relativeNow,
|
|
8
|
+
PageExitReason
|
|
8
9
|
} from '@cloudcare/browser-core'
|
|
9
10
|
|
|
10
11
|
import { getReplayStats as getReplayStatsImpl } from '../domain/replay/replayStats'
|
|
@@ -84,7 +85,17 @@ export function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
84
85
|
state = { status: RecorderStatus.IntentToStart }
|
|
85
86
|
}
|
|
86
87
|
})
|
|
87
|
-
|
|
88
|
+
lifeCycle.subscribe(
|
|
89
|
+
LifeCycleEventType.PAGE_EXITED,
|
|
90
|
+
function (pageExitEvent) {
|
|
91
|
+
if (
|
|
92
|
+
pageExitEvent.reason === PageExitReason.UNLOADING ||
|
|
93
|
+
pageExitEvent.reason === PageExitReason.PAGEHIDE
|
|
94
|
+
) {
|
|
95
|
+
stopStrategy()
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
)
|
|
88
99
|
lifeCycle.subscribe(LifeCycleEventType.SESSION_RENEWED, function () {
|
|
89
100
|
if (state.status === RecorderStatus.IntentToStart) {
|
|
90
101
|
startStrategy()
|
|
@@ -26,11 +26,7 @@ export function startUrlContexts(
|
|
|
26
26
|
|
|
27
27
|
var previousViewUrl
|
|
28
28
|
|
|
29
|
-
lifeCycle.subscribe(LifeCycleEventType.
|
|
30
|
-
urlContextHistory.closeActive(data.endClocks.relative)
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
lifeCycle.subscribe(LifeCycleEventType.VIEW_CREATED, function (data) {
|
|
29
|
+
lifeCycle.subscribe(LifeCycleEventType.BEFORE_VIEW_CREATED, function (data) {
|
|
34
30
|
var viewUrl = location.href
|
|
35
31
|
urlContextHistory.add(
|
|
36
32
|
buildUrlContext({
|
|
@@ -42,7 +38,9 @@ export function startUrlContexts(
|
|
|
42
38
|
)
|
|
43
39
|
previousViewUrl = viewUrl
|
|
44
40
|
})
|
|
45
|
-
|
|
41
|
+
lifeCycle.subscribe(LifeCycleEventType.AFTER_VIEW_ENDED, function (data) {
|
|
42
|
+
urlContextHistory.closeActive(data.endClocks.relative)
|
|
43
|
+
})
|
|
46
44
|
var locationChangeSubscription = locationChangeObservable.subscribe(function (
|
|
47
45
|
data
|
|
48
46
|
) {
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
SESSION_TIME_OUT_DELAY,
|
|
3
|
+
ContextHistory,
|
|
4
|
+
LifeCycleEventType
|
|
5
|
+
} from '@cloudcare/browser-core'
|
|
2
6
|
|
|
3
7
|
export var VIEW_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY
|
|
4
8
|
|
|
5
9
|
export function startViewContexts(lifeCycle) {
|
|
6
10
|
var viewContextHistory = new ContextHistory(VIEW_CONTEXT_TIME_OUT_DELAY)
|
|
7
11
|
|
|
8
|
-
lifeCycle.subscribe(LifeCycleEventType.
|
|
12
|
+
lifeCycle.subscribe(LifeCycleEventType.BEFORE_VIEW_CREATED, function (view) {
|
|
9
13
|
viewContextHistory.add(buildViewContext(view), view.startClocks.relative)
|
|
10
14
|
})
|
|
11
15
|
|
|
12
|
-
lifeCycle.subscribe(LifeCycleEventType.
|
|
16
|
+
lifeCycle.subscribe(LifeCycleEventType.AFTER_VIEW_ENDED, function (data) {
|
|
13
17
|
viewContextHistory.closeActive(data.endClocks.relative)
|
|
14
18
|
})
|
|
15
19
|
|
|
16
|
-
lifeCycle.subscribe(LifeCycleEventType.SESSION_RENEWED, function() {
|
|
20
|
+
lifeCycle.subscribe(LifeCycleEventType.SESSION_RENEWED, function () {
|
|
17
21
|
viewContextHistory.reset()
|
|
18
22
|
})
|
|
19
23
|
|
|
@@ -22,16 +26,16 @@ export function startViewContexts(lifeCycle) {
|
|
|
22
26
|
service: view.service,
|
|
23
27
|
version: view.version,
|
|
24
28
|
id: view.id,
|
|
25
|
-
name: view.name
|
|
29
|
+
name: view.name
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
return {
|
|
30
|
-
findView: function(startTime)
|
|
34
|
+
findView: function (startTime) {
|
|
31
35
|
return viewContextHistory.find(startTime)
|
|
32
36
|
},
|
|
33
|
-
stop: function() {
|
|
37
|
+
stop: function () {
|
|
34
38
|
viewContextHistory.stop()
|
|
35
|
-
}
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
}
|
|
@@ -73,6 +73,7 @@ function processMutations(
|
|
|
73
73
|
configuration,
|
|
74
74
|
shadowRootsController
|
|
75
75
|
) {
|
|
76
|
+
var nodePrivacyLevelCache = new Map()
|
|
76
77
|
mutations
|
|
77
78
|
.filter(function (mutation) {
|
|
78
79
|
return mutation.type === 'childList'
|
|
@@ -96,7 +97,8 @@ function processMutations(
|
|
|
96
97
|
nodeAndAncestorsHaveSerializedNode(mutation.target) &&
|
|
97
98
|
getNodePrivacyLevel(
|
|
98
99
|
mutation.target,
|
|
99
|
-
configuration.defaultPrivacyLevel
|
|
100
|
+
configuration.defaultPrivacyLevel,
|
|
101
|
+
nodePrivacyLevelCache
|
|
100
102
|
) !== NodePrivacyLevel.HIDDEN
|
|
101
103
|
)
|
|
102
104
|
})
|
|
@@ -105,7 +107,8 @@ function processMutations(
|
|
|
105
107
|
return mutation.type === 'childList'
|
|
106
108
|
}),
|
|
107
109
|
configuration,
|
|
108
|
-
shadowRootsController
|
|
110
|
+
shadowRootsController,
|
|
111
|
+
nodePrivacyLevelCache
|
|
109
112
|
)
|
|
110
113
|
var adds = _processChildListMutations.adds
|
|
111
114
|
var removes = _processChildListMutations.removes
|
|
@@ -123,7 +126,8 @@ function processMutations(
|
|
|
123
126
|
mutation.type === 'characterData' && !hasBeenSerialized(mutation.target)
|
|
124
127
|
)
|
|
125
128
|
}),
|
|
126
|
-
configuration
|
|
129
|
+
configuration,
|
|
130
|
+
nodePrivacyLevelCache
|
|
127
131
|
)
|
|
128
132
|
|
|
129
133
|
var attributes = processAttributesMutations(
|
|
@@ -132,7 +136,8 @@ function processMutations(
|
|
|
132
136
|
mutation.type === 'attributes' && !hasBeenSerialized(mutation.target)
|
|
133
137
|
)
|
|
134
138
|
}),
|
|
135
|
-
configuration
|
|
139
|
+
configuration,
|
|
140
|
+
nodePrivacyLevelCache
|
|
136
141
|
)
|
|
137
142
|
if (!texts.length && !attributes.length && !removes.length && !adds.length) {
|
|
138
143
|
return
|
|
@@ -148,7 +153,8 @@ function processMutations(
|
|
|
148
153
|
function processChildListMutations(
|
|
149
154
|
mutations,
|
|
150
155
|
configuration,
|
|
151
|
-
shadowRootsController
|
|
156
|
+
shadowRootsController,
|
|
157
|
+
nodePrivacyLevelCache
|
|
152
158
|
) {
|
|
153
159
|
// First, we iterate over mutations to collect:
|
|
154
160
|
//
|
|
@@ -200,7 +206,8 @@ function processChildListMutations(
|
|
|
200
206
|
|
|
201
207
|
var parentNodePrivacyLevel = getNodePrivacyLevel(
|
|
202
208
|
node.parentNode,
|
|
203
|
-
configuration.defaultPrivacyLevel
|
|
209
|
+
configuration.defaultPrivacyLevel,
|
|
210
|
+
nodePrivacyLevelCache
|
|
204
211
|
)
|
|
205
212
|
if (
|
|
206
213
|
parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN ||
|
|
@@ -267,7 +274,11 @@ function processChildListMutations(
|
|
|
267
274
|
}
|
|
268
275
|
}
|
|
269
276
|
|
|
270
|
-
function processCharacterDataMutations(
|
|
277
|
+
function processCharacterDataMutations(
|
|
278
|
+
mutations,
|
|
279
|
+
configuration,
|
|
280
|
+
nodePrivacyLevelCache
|
|
281
|
+
) {
|
|
271
282
|
var textMutations = []
|
|
272
283
|
|
|
273
284
|
// Deduplicate mutations based on their target node
|
|
@@ -289,7 +300,8 @@ function processCharacterDataMutations(mutations, configuration) {
|
|
|
289
300
|
|
|
290
301
|
var parentNodePrivacyLevel = getNodePrivacyLevel(
|
|
291
302
|
getParentNode(mutation.target),
|
|
292
|
-
configuration.defaultPrivacyLevel
|
|
303
|
+
configuration.defaultPrivacyLevel,
|
|
304
|
+
nodePrivacyLevelCache
|
|
293
305
|
)
|
|
294
306
|
if (
|
|
295
307
|
parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN ||
|
|
@@ -309,7 +321,11 @@ function processCharacterDataMutations(mutations, configuration) {
|
|
|
309
321
|
return textMutations
|
|
310
322
|
}
|
|
311
323
|
|
|
312
|
-
function processAttributesMutations(
|
|
324
|
+
function processAttributesMutations(
|
|
325
|
+
mutations,
|
|
326
|
+
configuration,
|
|
327
|
+
nodePrivacyLevelCache
|
|
328
|
+
) {
|
|
313
329
|
var attributeMutations = []
|
|
314
330
|
|
|
315
331
|
// Deduplicate mutations based on their target node and changed attribute
|
|
@@ -336,7 +352,8 @@ function processAttributesMutations(mutations, configuration) {
|
|
|
336
352
|
}
|
|
337
353
|
var privacyLevel = getNodePrivacyLevel(
|
|
338
354
|
mutation.target,
|
|
339
|
-
configuration.defaultPrivacyLevel
|
|
355
|
+
configuration.defaultPrivacyLevel,
|
|
356
|
+
nodePrivacyLevelCache
|
|
340
357
|
)
|
|
341
358
|
var attributeValue = serializeAttribute(
|
|
342
359
|
mutation.target,
|
|
@@ -145,16 +145,23 @@ export function initMoveObserver(cb) {
|
|
|
145
145
|
trailing: false
|
|
146
146
|
}
|
|
147
147
|
)
|
|
148
|
+
var cancelThrottle = _updatePosition.cancel
|
|
149
|
+
var updatePosition = _updatePosition.throttled
|
|
148
150
|
|
|
149
|
-
|
|
151
|
+
var _listener = addEventListeners(
|
|
150
152
|
document,
|
|
151
153
|
[DOM_EVENT.MOUSE_MOVE, DOM_EVENT.TOUCH_MOVE],
|
|
152
|
-
|
|
154
|
+
updatePosition,
|
|
153
155
|
{
|
|
154
156
|
capture: true,
|
|
155
157
|
passive: true
|
|
156
158
|
}
|
|
157
|
-
)
|
|
159
|
+
)
|
|
160
|
+
var removeListener = _listener.stop
|
|
161
|
+
return function () {
|
|
162
|
+
removeListener()
|
|
163
|
+
cancelThrottle()
|
|
164
|
+
}
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
var eventTypeToMouseInteraction = {
|
|
@@ -269,15 +276,18 @@ function initScrollObserver(cb, defaultPrivacyLevel, elementsScrollPositions) {
|
|
|
269
276
|
y: scrollPositions.scrollTop
|
|
270
277
|
})
|
|
271
278
|
}, SCROLL_OBSERVER_THRESHOLD)
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
)
|
|
279
|
+
var cancelThrottle = _updatePosition.cancel
|
|
280
|
+
var updatePosition = _updatePosition.throttled
|
|
281
|
+
|
|
282
|
+
var _listener = addEventListener(document, DOM_EVENT.SCROLL, updatePosition, {
|
|
283
|
+
capture: true,
|
|
284
|
+
passive: true
|
|
285
|
+
})
|
|
286
|
+
var removeListener = _listener.stop
|
|
287
|
+
return function () {
|
|
288
|
+
removeListener()
|
|
289
|
+
cancelThrottle()
|
|
290
|
+
}
|
|
281
291
|
}
|
|
282
292
|
|
|
283
293
|
function initViewportResizeObserver(cb) {
|
|
@@ -29,13 +29,23 @@ var TEXT_MASKING_CHAR = 'x'
|
|
|
29
29
|
*
|
|
30
30
|
* derivePrivacyLevelGivenParent(getNodeSelfPrivacyLevel(node), parentNodePrivacyLevel)
|
|
31
31
|
*/
|
|
32
|
-
export function getNodePrivacyLevel(node, defaultPrivacyLevel) {
|
|
32
|
+
export function getNodePrivacyLevel(node, defaultPrivacyLevel, cache) {
|
|
33
|
+
if (cache && cache.has(node)) {
|
|
34
|
+
return cache.get(node)
|
|
35
|
+
}
|
|
33
36
|
var parentNode = getParentNode(node)
|
|
34
37
|
var parentNodePrivacyLevel = parentNode
|
|
35
38
|
? getNodePrivacyLevel(parentNode, defaultPrivacyLevel)
|
|
36
39
|
: defaultPrivacyLevel
|
|
37
40
|
var selfNodePrivacyLevel = getNodeSelfPrivacyLevel(node)
|
|
38
|
-
|
|
41
|
+
var nodePrivacyLevel = reducePrivacyLevel(
|
|
42
|
+
selfNodePrivacyLevel,
|
|
43
|
+
parentNodePrivacyLevel
|
|
44
|
+
)
|
|
45
|
+
if (cache) {
|
|
46
|
+
cache.set(node, nodePrivacyLevel)
|
|
47
|
+
}
|
|
48
|
+
return nodePrivacyLevel
|
|
39
49
|
}
|
|
40
50
|
|
|
41
51
|
/**
|
|
@@ -19,8 +19,7 @@ import {
|
|
|
19
19
|
getTextContent,
|
|
20
20
|
shouldMaskNode,
|
|
21
21
|
reducePrivacyLevel,
|
|
22
|
-
getNodeSelfPrivacyLevel
|
|
23
|
-
MAX_ATTRIBUTE_VALUE_CHAR_LENGTH
|
|
22
|
+
getNodeSelfPrivacyLevel
|
|
24
23
|
} from './privacy'
|
|
25
24
|
import {
|
|
26
25
|
getSerializedNodeId,
|
|
@@ -34,7 +33,10 @@ import {
|
|
|
34
33
|
getHref,
|
|
35
34
|
getCssRulesString
|
|
36
35
|
} from './serializationUtils'
|
|
37
|
-
|
|
36
|
+
import {
|
|
37
|
+
isLongDataUrl,
|
|
38
|
+
sanitizeDataUrl
|
|
39
|
+
} from '../../rumEventsCollection/resource/resourceUtils'
|
|
38
40
|
// Those values are the only one that can be used when inheriting privacy levels from parent to
|
|
39
41
|
// children during serialization, since HIDDEN and IGNORE shouldn't serialize their children. This
|
|
40
42
|
// ensures that no children are serialized when they shouldn't.
|
|
@@ -310,13 +312,15 @@ export function serializeAttribute(
|
|
|
310
312
|
}
|
|
311
313
|
|
|
312
314
|
// Minimum Fix for customer.
|
|
313
|
-
if (
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
) {
|
|
317
|
-
|
|
315
|
+
// if (
|
|
316
|
+
// attributeValue.length > MAX_ATTRIBUTE_VALUE_CHAR_LENGTH &&
|
|
317
|
+
// attributeValue.slice(0, 5) === 'data:'
|
|
318
|
+
// ) {
|
|
319
|
+
// return 'data:truncated'
|
|
320
|
+
// }
|
|
321
|
+
if (isLongDataUrl(attributeValue)) {
|
|
322
|
+
return sanitizeDataUrl(attributeValue)
|
|
318
323
|
}
|
|
319
|
-
|
|
320
324
|
return attributeValue
|
|
321
325
|
}
|
|
322
326
|
|
|
@@ -42,7 +42,7 @@ export function computeFrustration(clicks, rageClick) {
|
|
|
42
42
|
export function isRage(clicks) {
|
|
43
43
|
if (
|
|
44
44
|
some(clicks, function (click) {
|
|
45
|
-
return click.getUserActivity().selection
|
|
45
|
+
return click.getUserActivity().selection || click.getUserActivity().scroll
|
|
46
46
|
})
|
|
47
47
|
) {
|
|
48
48
|
return false
|
|
@@ -80,7 +80,11 @@ var DEAD_CLICK_EXCLUDE_SELECTOR =
|
|
|
80
80
|
'a[href] *'
|
|
81
81
|
|
|
82
82
|
export function isDead(click) {
|
|
83
|
-
if (
|
|
83
|
+
if (
|
|
84
|
+
click.hasPageActivity() ||
|
|
85
|
+
click.getUserActivity().input ||
|
|
86
|
+
click.getUserActivity().scroll
|
|
87
|
+
) {
|
|
84
88
|
return false
|
|
85
89
|
}
|
|
86
90
|
return !elementMatches(click.event.target, DEAD_CLICK_EXCLUDE_SELECTOR)
|
|
@@ -4,7 +4,8 @@ export function listenActionEvents(events) {
|
|
|
4
4
|
var selectionEmptyAtPointerDown
|
|
5
5
|
var userActivity = {
|
|
6
6
|
selection: false,
|
|
7
|
-
input: false
|
|
7
|
+
input: false,
|
|
8
|
+
scroll: false
|
|
8
9
|
}
|
|
9
10
|
var clickContext
|
|
10
11
|
var listeners = [
|
|
@@ -16,7 +17,8 @@ export function listenActionEvents(events) {
|
|
|
16
17
|
selectionEmptyAtPointerDown = isSelectionEmpty()
|
|
17
18
|
userActivity = {
|
|
18
19
|
selection: false,
|
|
19
|
-
input: false
|
|
20
|
+
input: false,
|
|
21
|
+
scroll: false
|
|
20
22
|
}
|
|
21
23
|
clickContext = events.onPointerDown(event)
|
|
22
24
|
}
|
|
@@ -50,7 +52,14 @@ export function listenActionEvents(events) {
|
|
|
50
52
|
},
|
|
51
53
|
{ capture: true }
|
|
52
54
|
),
|
|
53
|
-
|
|
55
|
+
addEventListener(
|
|
56
|
+
window,
|
|
57
|
+
DOM_EVENT.SCROLL,
|
|
58
|
+
function () {
|
|
59
|
+
userActivity.scroll = true
|
|
60
|
+
},
|
|
61
|
+
{ capture: true, passive: true }
|
|
62
|
+
),
|
|
54
63
|
addEventListener(
|
|
55
64
|
window,
|
|
56
65
|
DOM_EVENT.INPUT,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
msToNs,
|
|
3
2
|
getStatusGroup,
|
|
4
3
|
UUID,
|
|
5
4
|
extend2Lev,
|
|
@@ -24,7 +23,9 @@ import {
|
|
|
24
23
|
isRequestKind,
|
|
25
24
|
is304,
|
|
26
25
|
isCacheHit,
|
|
27
|
-
isResourceUrlLimit
|
|
26
|
+
isResourceUrlLimit,
|
|
27
|
+
isLongDataUrl,
|
|
28
|
+
sanitizeDataUrl
|
|
28
29
|
} from './resourceUtils'
|
|
29
30
|
import { PageState } from '../../contexts/pageStateHistory.js'
|
|
30
31
|
export function startResourceCollection(
|
|
@@ -122,7 +123,9 @@ function processRequest(
|
|
|
122
123
|
method: request.method,
|
|
123
124
|
status: request.status,
|
|
124
125
|
statusGroup: getStatusGroup(request.status),
|
|
125
|
-
url: request.url
|
|
126
|
+
url: isLongDataUrl(request.url)
|
|
127
|
+
? sanitizeDataUrl(request.url)
|
|
128
|
+
: request.url,
|
|
126
129
|
urlHost: urlObj.Host,
|
|
127
130
|
urlPath: urlObj.Path,
|
|
128
131
|
urlPathGroup: replaceNumberCharByPath(urlObj.Path),
|
|
@@ -168,7 +171,9 @@ function processResourceEntry(
|
|
|
168
171
|
var entryMetrics = computePerformanceEntryMetrics(entry)
|
|
169
172
|
var urlObj = urlParse(entry.name).getParse()
|
|
170
173
|
var statusCode = ''
|
|
171
|
-
if (
|
|
174
|
+
if (entry.responseStatus !== 0) {
|
|
175
|
+
statusCode = entry.responseStatus
|
|
176
|
+
} else if (is304(entry)) {
|
|
172
177
|
statusCode = 304
|
|
173
178
|
} else if (isCacheHit(entry)) {
|
|
174
179
|
statusCode = 200
|
|
@@ -367,15 +367,43 @@ export function computeSize(entry) {
|
|
|
367
367
|
if (entry.startTime < entry.responseStart) {
|
|
368
368
|
return {
|
|
369
369
|
size: entry.decodedBodySize,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
: entry.encodedBodySize // max safe interger
|
|
370
|
+
encodedBodySize: entry.encodedBodySize,
|
|
371
|
+
decodedBodySize: entry.decodedBodySize,
|
|
372
|
+
transferSize: entry.transferSize
|
|
374
373
|
}
|
|
374
|
+
// return {
|
|
375
|
+
// size: entry.decodedBodySize,
|
|
376
|
+
// encodeSize:
|
|
377
|
+
// Number.MAX_SAFE_INTEGER < entry.encodedBodySize
|
|
378
|
+
// ? 0
|
|
379
|
+
// : entry.encodedBodySize // max safe interger
|
|
380
|
+
// }
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
size: undefined,
|
|
384
|
+
encodedBodySize: undefined,
|
|
385
|
+
decodedBodySize: undefined,
|
|
386
|
+
transferSize: undefined
|
|
375
387
|
}
|
|
376
|
-
return undefined
|
|
377
388
|
}
|
|
378
389
|
|
|
379
390
|
export function isAllowedRequestUrl(configuration, url) {
|
|
380
391
|
return url && !isIntakeRequest(url, configuration)
|
|
381
392
|
}
|
|
393
|
+
|
|
394
|
+
var DATA_URL_REGEX = /data:(.+)?(;base64)?,/g
|
|
395
|
+
export var MAX_ATTRIBUTE_VALUE_CHAR_LENGTH = 24_000
|
|
396
|
+
export function isLongDataUrl(url) {
|
|
397
|
+
if (url.length <= MAX_ATTRIBUTE_VALUE_CHAR_LENGTH) {
|
|
398
|
+
return false
|
|
399
|
+
} else if (url.substring(0, 5) === 'data:') {
|
|
400
|
+
// Avoid String.match RangeError: Maximum call stack size exceeded
|
|
401
|
+
url = url.substring(0, MAX_ATTRIBUTE_VALUE_CHAR_LENGTH)
|
|
402
|
+
return true
|
|
403
|
+
}
|
|
404
|
+
return false
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export function sanitizeDataUrl(url) {
|
|
408
|
+
return url.match(DATA_URL_REGEX)[0] + '[...]'
|
|
409
|
+
}
|
|
@@ -49,7 +49,11 @@ export function trackCumulativeLayoutShift(lifeCycle, configuration, callback) {
|
|
|
49
49
|
var cls = round(maxClsValue, 4)
|
|
50
50
|
var clsTarget = window.largestLayoutShiftTarget()
|
|
51
51
|
var cslTargetSelector
|
|
52
|
-
if (
|
|
52
|
+
if (
|
|
53
|
+
clsTarget &&
|
|
54
|
+
// 检测目标是否在dom 中被删除
|
|
55
|
+
clsTarget.isConnected
|
|
56
|
+
) {
|
|
53
57
|
cslTargetSelector = getSelectorFromElement(
|
|
54
58
|
clsTarget,
|
|
55
59
|
configuration.actionNameAttribute
|
|
@@ -67,7 +67,10 @@ export function trackInteractionToNextPaint(
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
var newInteraction = longestInteractions.estimateP98Duration()
|
|
70
|
-
if (
|
|
70
|
+
if (
|
|
71
|
+
newInteraction &&
|
|
72
|
+
newInteraction.duration !== interactionToNextPaint
|
|
73
|
+
) {
|
|
71
74
|
interactionToNextPaint = newInteraction.duration
|
|
72
75
|
if (interactionToNextPaint > 10 * ONE_MINUTE && !telemetryCollected) {
|
|
73
76
|
telemetryCollected = true
|
|
@@ -35,6 +35,7 @@ export function trackLargestContentfulPaint(
|
|
|
35
35
|
{ capture: true, once: true }
|
|
36
36
|
)
|
|
37
37
|
var stopEventListener = _addEventListeners.stop
|
|
38
|
+
var biggestLcpSize = 0
|
|
38
39
|
var subscribe = lifeCycle.subscribe(
|
|
39
40
|
LifeCycleEventType.PERFORMANCE_ENTRIES_COLLECTED,
|
|
40
41
|
function (entries) {
|
|
@@ -43,7 +44,10 @@ export function trackLargestContentfulPaint(
|
|
|
43
44
|
entry.entryType === 'largest-contentful-paint' &&
|
|
44
45
|
entry.startTime < firstInteractionTimestamp &&
|
|
45
46
|
entry.startTime < firstHidden.geTimeStamp() &&
|
|
46
|
-
entry.startTime < LCP_MAXIMUM_DELAY
|
|
47
|
+
entry.startTime < LCP_MAXIMUM_DELAY &&
|
|
48
|
+
// Ensure to get the LCP entry with the biggest size, see
|
|
49
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1516655
|
|
50
|
+
entry.size > biggestLcpSize
|
|
47
51
|
)
|
|
48
52
|
})
|
|
49
53
|
if (lcpEntry) {
|
|
@@ -58,6 +62,7 @@ export function trackLargestContentfulPaint(
|
|
|
58
62
|
value: lcpEntry.startTime,
|
|
59
63
|
targetSelector: lcpTargetSelector
|
|
60
64
|
})
|
|
65
|
+
biggestLcpSize = lcpEntry.size
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
68
|
)
|
|
@@ -159,14 +159,15 @@ function newView(
|
|
|
159
159
|
service = viewOptions.service
|
|
160
160
|
version = viewOptions.version
|
|
161
161
|
}
|
|
162
|
-
|
|
163
|
-
lifeCycle.notify(LifeCycleEventType.VIEW_CREATED, {
|
|
162
|
+
var viewCreatedEvent = {
|
|
164
163
|
id: id,
|
|
165
164
|
name: name,
|
|
166
165
|
startClocks: startClocks,
|
|
167
166
|
service: service,
|
|
168
167
|
version: version
|
|
169
|
-
}
|
|
168
|
+
}
|
|
169
|
+
lifeCycle.notify(LifeCycleEventType.BEFORE_VIEW_CREATED, viewCreatedEvent)
|
|
170
|
+
lifeCycle.notify(LifeCycleEventType.VIEW_CREATED, viewCreatedEvent)
|
|
170
171
|
|
|
171
172
|
// Update the view every time the measures are changing
|
|
172
173
|
var _scheduleViewUpdate = throttle(
|
|
@@ -264,6 +265,9 @@ function newView(
|
|
|
264
265
|
true
|
|
265
266
|
)
|
|
266
267
|
lifeCycle.notify(LifeCycleEventType.VIEW_ENDED, { endClocks: endClocks })
|
|
268
|
+
lifeCycle.notify(LifeCycleEventType.AFTER_VIEW_ENDED, {
|
|
269
|
+
endClocks: endClocks
|
|
270
|
+
})
|
|
267
271
|
clearInterval(keepAliveIntervalId)
|
|
268
272
|
setViewEnd(endClocks.relative)
|
|
269
273
|
stopCommonViewMetricsTracking()
|