@kubesense/kubesense-browser-rum 1.8.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +23 -0
- package/bundle/chunks/kubesenseProfiler-4b8cfd8f889074788478-kubesense-rum.js +1 -0
- package/bundle/chunks/kubesenseRecorder-db948e96649585a2b3e9-kubesense-rum.js +1 -0
- package/bundle/kubesense-rum.js +1 -1
- package/cjs/boot/kubesenseRecorder.d.ts +6 -0
- package/cjs/boot/kubesenseRecorder.js +75 -0
- package/cjs/boot/kubesenseRecorder.js.map +1 -0
- package/cjs/boot/lazyLoadProfiler.d.ts +3 -4
- package/cjs/boot/lazyLoadProfiler.js +18 -50
- package/cjs/boot/lazyLoadProfiler.js.map +1 -1
- package/cjs/boot/lazyLoadRecorder.d.ts +3 -4
- package/cjs/boot/lazyLoadRecorder.js +18 -50
- package/cjs/boot/lazyLoadRecorder.js.map +1 -1
- package/cjs/boot/postStartStrategy.d.ts +4 -4
- package/cjs/boot/postStartStrategy.js +89 -110
- package/cjs/boot/postStartStrategy.js.map +1 -1
- package/cjs/boot/preStartStrategy.js +21 -21
- package/cjs/boot/preStartStrategy.js.map +1 -1
- package/cjs/boot/profilerApi.js +44 -50
- package/cjs/boot/profilerApi.js.map +1 -1
- package/cjs/boot/recorderApi.d.ts +1 -3
- package/cjs/boot/recorderApi.js +41 -71
- package/cjs/boot/recorderApi.js.map +1 -1
- package/cjs/domain/deflate/deflateEncoder.d.ts +1 -2
- package/cjs/domain/deflate/deflateEncoder.js +94 -108
- package/cjs/domain/deflate/deflateEncoder.js.map +1 -1
- package/cjs/domain/deflate/deflateWorker.d.ts +3 -4
- package/cjs/domain/deflate/deflateWorker.js +79 -90
- package/cjs/domain/deflate/deflateWorker.js.map +1 -1
- package/cjs/domain/deflate/index.d.ts +1 -1
- package/cjs/domain/deflate/index.js +5 -10
- package/cjs/domain/getSessionReplayLink.d.ts +3 -2
- package/cjs/domain/getSessionReplayLink.js +17 -31
- package/cjs/domain/getSessionReplayLink.js.map +1 -1
- package/cjs/domain/profiling/actionHistory.d.ts +10 -0
- package/cjs/domain/profiling/actionHistory.js +37 -0
- package/cjs/domain/profiling/actionHistory.js.map +1 -0
- package/cjs/domain/profiling/kubesenseProfiler.d.ts +6 -0
- package/cjs/domain/profiling/kubesenseProfiler.js +243 -0
- package/cjs/domain/profiling/kubesenseProfiler.js.map +1 -0
- package/cjs/domain/profiling/longTaskHistory.d.ts +11 -0
- package/cjs/domain/profiling/longTaskHistory.js +22 -0
- package/cjs/domain/profiling/longTaskHistory.js.map +1 -0
- package/cjs/domain/profiling/profilerDebugIds.d.ts +2 -0
- package/cjs/domain/profiling/profilerDebugIds.js +18 -0
- package/cjs/domain/profiling/profilerDebugIds.js.map +1 -0
- package/cjs/domain/profiling/profilingContext.js +20 -25
- package/cjs/domain/profiling/profilingContext.js.map +1 -1
- package/cjs/domain/profiling/profilingSupported.js +6 -8
- package/cjs/domain/profiling/profilingSupported.js.map +1 -1
- package/cjs/domain/profiling/quotaCheck.d.ts +9 -0
- package/cjs/domain/profiling/quotaCheck.js +66 -0
- package/cjs/domain/profiling/quotaCheck.js.map +1 -0
- package/cjs/domain/profiling/test-utils/mockedTrace.d.ts +1 -1
- package/cjs/domain/profiling/transport/buildProfileEvent.d.ts +38 -0
- package/cjs/domain/profiling/transport/buildProfileEvent.js +91 -0
- package/cjs/domain/profiling/transport/buildProfileEvent.js.map +1 -0
- package/cjs/domain/profiling/transport/formDataEmitter.d.ts +5 -0
- package/cjs/domain/profiling/transport/formDataEmitter.js +17 -0
- package/cjs/domain/profiling/transport/formDataEmitter.js.map +1 -0
- package/cjs/domain/profiling/transport/profilingBridge.d.ts +2 -0
- package/cjs/domain/profiling/transport/profilingBridge.js +12 -0
- package/cjs/domain/profiling/transport/profilingBridge.js.map +1 -0
- package/cjs/domain/profiling/{types/rumProfiler.types.d.ts → types.d.ts} +13 -24
- package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.js +5 -5
- package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.js.map +1 -1
- package/cjs/domain/profiling/utils/getDefaultViewName.js +6 -10
- package/cjs/domain/profiling/utils/getDefaultViewName.js.map +1 -1
- package/cjs/domain/profiling/vitalHistory.d.ts +13 -0
- package/cjs/domain/profiling/vitalHistory.js +56 -0
- package/cjs/domain/profiling/vitalHistory.js.map +1 -0
- package/cjs/domain/record/assembly.d.ts +2 -1
- package/cjs/domain/record/assembly.js +15 -14
- package/cjs/domain/record/assembly.js.map +1 -1
- package/cjs/domain/record/canvas/canvasHash.d.ts +2 -0
- package/cjs/domain/record/canvas/canvasHash.js +33 -0
- package/cjs/domain/record/canvas/canvasHash.js.map +1 -0
- package/cjs/domain/record/canvas/canvasManager.d.ts +42 -0
- package/cjs/domain/record/canvas/canvasManager.js +99 -0
- package/cjs/domain/record/canvas/canvasManager.js.map +1 -0
- package/cjs/domain/record/canvas/canvasSnapshot.d.ts +8 -0
- package/cjs/domain/record/canvas/canvasSnapshot.js +40 -0
- package/cjs/domain/record/canvas/canvasSnapshot.js.map +1 -0
- package/cjs/domain/record/canvas/canvasUtils.d.ts +2 -0
- package/cjs/domain/record/canvas/canvasUtils.js +14 -0
- package/cjs/domain/record/canvas/canvasUtils.js.map +1 -0
- package/cjs/domain/record/elementsScrollPositions.js +17 -20
- package/cjs/domain/record/elementsScrollPositions.js.map +1 -1
- package/cjs/domain/record/encoding/changeDecoder.d.ts +39 -0
- package/cjs/domain/record/encoding/changeDecoder.js +152 -0
- package/cjs/domain/record/encoding/changeDecoder.js.map +1 -0
- package/cjs/domain/record/encoding/changeEncoder.d.ts +39 -0
- package/cjs/domain/record/encoding/changeEncoder.js +146 -0
- package/cjs/domain/record/encoding/changeEncoder.js.map +1 -0
- package/cjs/domain/record/encoding/index.d.ts +10 -0
- package/cjs/domain/record/encoding/itemIds.d.ts +32 -0
- package/cjs/domain/record/encoding/itemIds.js +49 -0
- package/cjs/domain/record/encoding/itemIds.js.map +1 -0
- package/cjs/domain/record/encoding/roles.d.ts +52 -0
- package/cjs/domain/record/encoding/roles.js +66 -0
- package/cjs/domain/record/encoding/roles.js.map +1 -0
- package/cjs/domain/record/encoding/stringIds.d.ts +15 -0
- package/cjs/domain/record/encoding/stringIds.js +47 -0
- package/cjs/domain/record/encoding/stringIds.js.map +1 -0
- package/cjs/domain/record/encoding/stringTable.d.ts +15 -0
- package/cjs/domain/record/encoding/stringTable.js +38 -0
- package/cjs/domain/record/encoding/stringTable.js.map +1 -0
- package/cjs/domain/record/eventsUtils.js +9 -10
- package/cjs/domain/record/eventsUtils.js.map +1 -1
- package/cjs/domain/record/index.d.ts +5 -2
- package/cjs/domain/record/index.js +13 -17
- package/cjs/domain/record/internalApi.d.ts +6 -6
- package/cjs/domain/record/internalApi.js +55 -49
- package/cjs/domain/record/internalApi.js.map +1 -1
- package/cjs/domain/record/mutationBatch.d.ts +1 -0
- package/cjs/domain/record/mutationBatch.js +38 -39
- package/cjs/domain/record/mutationBatch.js.map +1 -1
- package/cjs/domain/record/record.d.ts +7 -1
- package/cjs/domain/record/record.js +76 -87
- package/cjs/domain/record/record.js.map +1 -1
- package/cjs/domain/record/record.types.d.ts +1 -0
- package/cjs/domain/record/recordingScope.d.ts +7 -3
- package/cjs/domain/record/recordingScope.js +25 -11
- package/cjs/domain/record/recordingScope.js.map +1 -1
- package/cjs/domain/record/serialization/index.d.ts +4 -2
- package/cjs/domain/record/serialization/index.js +16 -18
- package/cjs/domain/record/serialization/insertionCursor.d.ts +57 -0
- package/cjs/domain/record/serialization/insertionCursor.js +55 -0
- package/cjs/domain/record/serialization/insertionCursor.js.map +1 -0
- package/cjs/domain/record/serialization/serialization.types.d.ts +0 -6
- package/cjs/domain/record/serialization/serializationStats.js +26 -25
- package/cjs/domain/record/serialization/serializationStats.js.map +1 -1
- package/cjs/domain/record/serialization/serializationTransaction.d.ts +44 -22
- package/cjs/domain/record/serialization/serializationTransaction.js +90 -36
- package/cjs/domain/record/serialization/serializationTransaction.js.map +1 -1
- package/cjs/domain/record/serialization/serializationUtils.d.ts +0 -1
- package/cjs/domain/record/serialization/serializationUtils.js +46 -75
- package/cjs/domain/record/serialization/serializationUtils.js.map +1 -1
- package/cjs/domain/record/serialization/serializeAttribute.js +24 -39
- package/cjs/domain/record/serialization/serializeAttribute.js.map +1 -1
- package/cjs/domain/record/serialization/serializeAttributes.d.ts +2 -2
- package/cjs/domain/record/serialization/serializeAttributes.js +100 -152
- package/cjs/domain/record/serialization/serializeAttributes.js.map +1 -1
- package/cjs/domain/record/serialization/serializeFullSnapshot.d.ts +5 -0
- package/cjs/domain/record/serialization/serializeFullSnapshot.js +14 -0
- package/cjs/domain/record/serialization/serializeFullSnapshot.js.map +1 -0
- package/cjs/domain/record/serialization/serializeMutations.d.ts +5 -0
- package/cjs/domain/record/serialization/serializeMutations.js +152 -0
- package/cjs/domain/record/serialization/serializeMutations.js.map +1 -0
- package/cjs/domain/record/serialization/serializeNode.d.ts +3 -6
- package/cjs/domain/record/serialization/serializeNode.js +116 -144
- package/cjs/domain/record/serialization/serializeNode.js.map +1 -1
- package/cjs/domain/record/shadowRootsController.d.ts +2 -2
- package/cjs/domain/record/shadowRootsController.js +37 -42
- package/cjs/domain/record/shadowRootsController.js.map +1 -1
- package/cjs/domain/record/startFullSnapshots.d.ts +1 -1
- package/cjs/domain/record/startFullSnapshots.js +38 -54
- package/cjs/domain/record/startFullSnapshots.js.map +1 -1
- package/cjs/domain/record/trackers/index.d.ts +2 -1
- package/cjs/domain/record/trackers/index.js +25 -27
- package/cjs/domain/record/trackers/trackCanvasCapture.d.ts +3 -0
- package/cjs/domain/record/trackers/trackCanvasCapture.js +102 -0
- package/cjs/domain/record/trackers/trackCanvasCapture.js.map +1 -0
- package/cjs/domain/record/trackers/trackCanvasContent.d.ts +3 -0
- package/cjs/domain/record/trackers/trackCanvasContent.js +31 -0
- package/cjs/domain/record/trackers/trackCanvasContent.js.map +1 -0
- package/cjs/domain/record/trackers/trackFocus.d.ts +1 -2
- package/cjs/domain/record/trackers/trackFocus.js +15 -13
- package/cjs/domain/record/trackers/trackFocus.js.map +1 -1
- package/cjs/domain/record/trackers/trackInput.d.ts +2 -2
- package/cjs/domain/record/trackers/trackInput.js +129 -102
- package/cjs/domain/record/trackers/trackInput.js.map +1 -1
- package/cjs/domain/record/trackers/trackMediaInteraction.js +22 -26
- package/cjs/domain/record/trackers/trackMediaInteraction.js.map +1 -1
- package/cjs/domain/record/trackers/trackMouseInteraction.js +47 -54
- package/cjs/domain/record/trackers/trackMouseInteraction.js.map +1 -1
- package/cjs/domain/record/trackers/trackMove.js +43 -49
- package/cjs/domain/record/trackers/trackMove.js.map +1 -1
- package/cjs/domain/record/trackers/trackMutation.d.ts +3 -3
- package/cjs/domain/record/trackers/trackMutation.js +42 -267
- package/cjs/domain/record/trackers/trackMutation.js.map +1 -1
- package/cjs/domain/record/trackers/trackScroll.js +36 -44
- package/cjs/domain/record/trackers/trackScroll.js.map +1 -1
- package/cjs/domain/record/trackers/trackStyleSheet.js +75 -84
- package/cjs/domain/record/trackers/trackStyleSheet.js.map +1 -1
- package/cjs/domain/record/trackers/trackViewEnd.js +17 -17
- package/cjs/domain/record/trackers/trackViewEnd.js.map +1 -1
- package/cjs/domain/record/trackers/trackViewportResize.d.ts +2 -3
- package/cjs/domain/record/trackers/trackViewportResize.js +36 -42
- package/cjs/domain/record/trackers/trackViewportResize.js.map +1 -1
- package/cjs/domain/record/viewports.js +32 -50
- package/cjs/domain/record/viewports.js.map +1 -1
- package/cjs/domain/replayStats.d.ts +1 -0
- package/cjs/domain/replayStats.js +36 -44
- package/cjs/domain/replayStats.js.map +1 -1
- package/cjs/domain/scriptLoadingError.js +15 -22
- package/cjs/domain/scriptLoadingError.js.map +1 -1
- package/cjs/domain/segmentCollection/buildReplayPayload.js +22 -23
- package/cjs/domain/segmentCollection/buildReplayPayload.js.map +1 -1
- package/cjs/domain/segmentCollection/buildResourcePayload.d.ts +5 -0
- package/cjs/domain/segmentCollection/buildResourcePayload.js +19 -0
- package/cjs/domain/segmentCollection/buildResourcePayload.js.map +1 -0
- package/cjs/domain/segmentCollection/index.d.ts +3 -0
- package/cjs/domain/segmentCollection/index.js +14 -11
- package/cjs/domain/segmentCollection/replayResourceCollection.d.ts +10 -0
- package/cjs/domain/segmentCollection/replayResourceCollection.js +52 -0
- package/cjs/domain/segmentCollection/replayResourceCollection.js.map +1 -0
- package/cjs/domain/segmentCollection/segment.js +50 -80
- package/cjs/domain/segmentCollection/segment.js.map +1 -1
- package/cjs/domain/segmentCollection/segmentCollection.d.ts +4 -4
- package/cjs/domain/segmentCollection/segmentCollection.js +87 -105
- package/cjs/domain/segmentCollection/segmentCollection.js.map +1 -1
- package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.d.ts +16 -0
- package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.js +29 -0
- package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.js.map +1 -0
- package/cjs/domain/segmentCollection/startSegmentTelemetry.js +40 -42
- package/cjs/domain/segmentCollection/startSegmentTelemetry.js.map +1 -1
- package/cjs/domain/startRecordBridge.js +10 -14
- package/cjs/domain/startRecordBridge.js.map +1 -1
- package/cjs/domain/startRecorderInitTelemetry.js +42 -50
- package/cjs/domain/startRecorderInitTelemetry.js.map +1 -1
- package/cjs/entries/internal.d.ts +11 -2
- package/cjs/entries/internal.js +47 -28
- package/cjs/entries/internalSynthetics.js +26 -24
- package/cjs/entries/internalSynthetics.js.map +1 -1
- package/cjs/entries/main.d.ts +5 -3
- package/cjs/entries/main.js +50 -31
- package/cjs/entries/main.js.map +1 -1
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/profiling.d.ts +313 -0
- package/cjs/types/sessionReplay.d.ts +381 -3
- package/cjs/types/sessionReplayConstants.d.ts +57 -0
- package/cjs/types/sessionReplayConstants.js +104 -47
- package/cjs/types/sessionReplayConstants.js.map +1 -1
- package/esm/boot/kubesenseRecorder.mjs +75 -0
- package/esm/boot/kubesenseRecorder.mjs.map +1 -0
- package/esm/boot/lazyLoadProfiler.mjs +24 -0
- package/esm/boot/lazyLoadProfiler.mjs.map +1 -0
- package/esm/boot/lazyLoadRecorder.mjs +24 -0
- package/esm/boot/lazyLoadRecorder.mjs.map +1 -0
- package/esm/boot/postStartStrategy.mjs +97 -0
- package/esm/boot/postStartStrategy.mjs.map +1 -0
- package/esm/boot/preStartStrategy.mjs +24 -0
- package/esm/boot/preStartStrategy.mjs.map +1 -0
- package/esm/boot/profilerApi.mjs +47 -0
- package/esm/boot/profilerApi.mjs.map +1 -0
- package/esm/boot/recorderApi.mjs +43 -0
- package/esm/boot/recorderApi.mjs.map +1 -0
- package/esm/domain/deflate/deflateEncoder.mjs +96 -0
- package/esm/domain/deflate/deflateEncoder.mjs.map +1 -0
- package/esm/domain/deflate/deflateWorker.mjs +90 -0
- package/esm/domain/deflate/deflateWorker.mjs.map +1 -0
- package/esm/domain/deflate/index.mjs +3 -0
- package/esm/domain/getSessionReplayLink.mjs +21 -0
- package/esm/domain/getSessionReplayLink.mjs.map +1 -0
- package/esm/domain/profiling/actionHistory.mjs +36 -0
- package/esm/domain/profiling/actionHistory.mjs.map +1 -0
- package/esm/domain/profiling/kubesenseProfiler.mjs +242 -0
- package/esm/domain/profiling/kubesenseProfiler.mjs.map +1 -0
- package/esm/domain/profiling/longTaskHistory.mjs +21 -0
- package/esm/domain/profiling/longTaskHistory.mjs.map +1 -0
- package/esm/domain/profiling/profilerDebugIds.mjs +18 -0
- package/esm/domain/profiling/profilerDebugIds.mjs.map +1 -0
- package/esm/domain/profiling/profilingContext.mjs +23 -0
- package/esm/domain/profiling/profilingContext.mjs.map +1 -0
- package/esm/domain/profiling/profilingSupported.mjs +9 -0
- package/esm/domain/profiling/profilingSupported.mjs.map +1 -0
- package/esm/domain/profiling/quotaCheck.mjs +66 -0
- package/esm/domain/profiling/quotaCheck.mjs.map +1 -0
- package/esm/domain/profiling/transport/buildProfileEvent.mjs +90 -0
- package/esm/domain/profiling/transport/buildProfileEvent.mjs.map +1 -0
- package/esm/domain/profiling/transport/formDataEmitter.mjs +17 -0
- package/esm/domain/profiling/transport/formDataEmitter.mjs.map +1 -0
- package/esm/domain/profiling/transport/profilingBridge.mjs +12 -0
- package/esm/domain/profiling/transport/profilingBridge.mjs.map +1 -0
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.mjs +7 -0
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.mjs.map +1 -0
- package/esm/domain/profiling/utils/getDefaultViewName.mjs +10 -0
- package/esm/domain/profiling/utils/getDefaultViewName.mjs.map +1 -0
- package/esm/domain/profiling/vitalHistory.mjs +55 -0
- package/esm/domain/profiling/vitalHistory.mjs.map +1 -0
- package/esm/domain/record/assembly.mjs +17 -0
- package/esm/domain/record/assembly.mjs.map +1 -0
- package/esm/domain/record/canvas/canvasHash.mjs +33 -0
- package/esm/domain/record/canvas/canvasHash.mjs.map +1 -0
- package/esm/domain/record/canvas/canvasManager.mjs +99 -0
- package/esm/domain/record/canvas/canvasManager.mjs.map +1 -0
- package/esm/domain/record/canvas/canvasSnapshot.mjs +38 -0
- package/esm/domain/record/canvas/canvasSnapshot.mjs.map +1 -0
- package/esm/domain/record/canvas/canvasUtils.mjs +13 -0
- package/esm/domain/record/canvas/canvasUtils.mjs.map +1 -0
- package/esm/domain/record/elementsScrollPositions.mjs +20 -0
- package/esm/domain/record/elementsScrollPositions.mjs.map +1 -0
- package/esm/domain/record/encoding/changeDecoder.mjs +152 -0
- package/esm/domain/record/encoding/changeDecoder.mjs.map +1 -0
- package/esm/domain/record/encoding/changeEncoder.mjs +146 -0
- package/esm/domain/record/encoding/changeEncoder.mjs.map +1 -0
- package/esm/domain/record/encoding/itemIds.mjs +47 -0
- package/esm/domain/record/encoding/itemIds.mjs.map +1 -0
- package/esm/domain/record/encoding/roles.mjs +64 -0
- package/esm/domain/record/encoding/roles.mjs.map +1 -0
- package/esm/domain/record/encoding/stringIds.mjs +47 -0
- package/esm/domain/record/encoding/stringIds.mjs.map +1 -0
- package/esm/domain/record/encoding/stringTable.mjs +38 -0
- package/esm/domain/record/encoding/stringTable.mjs.map +1 -0
- package/esm/domain/record/eventsUtils.mjs +13 -0
- package/esm/domain/record/eventsUtils.mjs.map +1 -0
- package/esm/domain/record/index.mjs +8 -0
- package/esm/domain/record/internalApi.mjs +62 -0
- package/esm/domain/record/internalApi.mjs.map +1 -0
- package/esm/domain/record/mutationBatch.mjs +43 -0
- package/esm/domain/record/mutationBatch.mjs.map +1 -0
- package/esm/domain/record/record.mjs +79 -0
- package/esm/domain/record/record.mjs.map +1 -0
- package/esm/domain/record/recordingScope.mjs +27 -0
- package/esm/domain/record/recordingScope.mjs.map +1 -0
- package/esm/domain/record/serialization/index.mjs +9 -0
- package/esm/domain/record/serialization/insertionCursor.mjs +54 -0
- package/esm/domain/record/serialization/insertionCursor.mjs.map +1 -0
- package/esm/domain/record/serialization/serializationStats.mjs +31 -0
- package/esm/domain/record/serialization/serializationStats.mjs.map +1 -0
- package/esm/domain/record/serialization/serializationTransaction.mjs +92 -0
- package/esm/domain/record/serialization/serializationTransaction.mjs.map +1 -0
- package/esm/domain/record/serialization/serializationUtils.mjs +53 -0
- package/esm/domain/record/serialization/serializationUtils.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeAttribute.mjs +26 -0
- package/esm/domain/record/serialization/serializeAttribute.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeAttributes.mjs +113 -0
- package/esm/domain/record/serialization/serializeAttributes.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeFullSnapshot.mjs +14 -0
- package/esm/domain/record/serialization/serializeFullSnapshot.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeMutations.mjs +152 -0
- package/esm/domain/record/serialization/serializeMutations.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeNode.mjs +126 -0
- package/esm/domain/record/serialization/serializeNode.mjs.map +1 -0
- package/esm/domain/record/shadowRootsController.mjs +40 -0
- package/esm/domain/record/shadowRootsController.mjs.map +1 -0
- package/esm/domain/record/startFullSnapshots.mjs +42 -0
- package/esm/domain/record/startFullSnapshots.mjs.map +1 -0
- package/esm/domain/record/trackers/index.mjs +13 -0
- package/esm/domain/record/trackers/trackCanvasCapture.mjs +102 -0
- package/esm/domain/record/trackers/trackCanvasCapture.mjs.map +1 -0
- package/esm/domain/record/trackers/trackCanvasContent.mjs +31 -0
- package/esm/domain/record/trackers/trackCanvasContent.mjs.map +1 -0
- package/esm/domain/record/trackers/trackFocus.mjs +17 -0
- package/esm/domain/record/trackers/trackFocus.mjs.map +1 -0
- package/esm/domain/record/trackers/trackInput.mjs +131 -0
- package/esm/domain/record/trackers/trackInput.mjs.map +1 -0
- package/esm/domain/record/trackers/trackMediaInteraction.mjs +25 -0
- package/esm/domain/record/trackers/trackMediaInteraction.mjs.map +1 -0
- package/esm/domain/record/trackers/trackMouseInteraction.mjs +52 -0
- package/esm/domain/record/trackers/trackMouseInteraction.mjs.map +1 -0
- package/esm/domain/record/trackers/trackMove.mjs +48 -0
- package/esm/domain/record/trackers/trackMove.mjs.map +1 -0
- package/esm/domain/record/trackers/trackMutation.mjs +45 -0
- package/esm/domain/record/trackers/trackMutation.mjs.map +1 -0
- package/esm/domain/record/trackers/trackScroll.mjs +40 -0
- package/esm/domain/record/trackers/trackScroll.mjs.map +1 -0
- package/esm/domain/record/trackers/trackStyleSheet.mjs +79 -0
- package/esm/domain/record/trackers/trackStyleSheet.mjs.map +1 -0
- package/esm/domain/record/trackers/trackViewEnd.mjs +20 -0
- package/esm/domain/record/trackers/trackViewEnd.mjs.map +1 -0
- package/esm/domain/record/trackers/trackViewportResize.mjs +39 -0
- package/esm/domain/record/trackers/trackViewportResize.mjs.map +1 -0
- package/esm/domain/record/viewports.mjs +41 -0
- package/esm/domain/record/viewports.mjs.map +1 -0
- package/esm/domain/replayStats.mjs +46 -0
- package/esm/domain/replayStats.mjs.map +1 -0
- package/esm/domain/scriptLoadingError.mjs +19 -0
- package/esm/domain/scriptLoadingError.mjs.map +1 -0
- package/esm/domain/segmentCollection/buildReplayPayload.mjs +25 -0
- package/esm/domain/segmentCollection/buildReplayPayload.mjs.map +1 -0
- package/esm/domain/segmentCollection/buildResourcePayload.mjs +19 -0
- package/esm/domain/segmentCollection/buildResourcePayload.mjs.map +1 -0
- package/esm/domain/segmentCollection/index.mjs +5 -0
- package/esm/domain/segmentCollection/replayResourceCollection.mjs +52 -0
- package/esm/domain/segmentCollection/replayResourceCollection.mjs.map +1 -0
- package/esm/domain/segmentCollection/segment.mjs +52 -0
- package/esm/domain/segmentCollection/segment.mjs.map +1 -0
- package/esm/domain/segmentCollection/segmentCollection.mjs +87 -0
- package/esm/domain/segmentCollection/segmentCollection.mjs.map +1 -0
- package/esm/domain/segmentCollection/startDroppedSegmentRecovery.mjs +28 -0
- package/esm/domain/segmentCollection/startDroppedSegmentRecovery.mjs.map +1 -0
- package/esm/domain/segmentCollection/startSegmentTelemetry.mjs +45 -0
- package/esm/domain/segmentCollection/startSegmentTelemetry.mjs.map +1 -0
- package/esm/domain/startRecordBridge.mjs +13 -0
- package/esm/domain/startRecordBridge.mjs.map +1 -0
- package/esm/domain/startRecorderInitTelemetry.mjs +47 -0
- package/esm/domain/startRecorderInitTelemetry.mjs.map +1 -0
- package/esm/entries/internal.mjs +8 -0
- package/esm/entries/internalSynthetics.mjs +22 -0
- package/esm/entries/internalSynthetics.mjs.map +1 -0
- package/esm/entries/main.mjs +35 -0
- package/esm/entries/main.mjs.map +1 -0
- package/esm/types/sessionReplayConstants.mjs +97 -0
- package/esm/types/sessionReplayConstants.mjs.map +1 -0
- package/internal/package.json +1 -1
- package/internal-synthetics/package.json +1 -1
- package/package.json +26 -15
- package/src/boot/kubesenseRecorder.ts +134 -0
- package/src/boot/lazyLoadProfiler.ts +6 -7
- package/src/boot/lazyLoadRecorder.ts +6 -7
- package/src/boot/postStartStrategy.ts +18 -16
- package/src/boot/profilerApi.ts +29 -19
- package/src/boot/recorderApi.ts +6 -21
- package/src/domain/deflate/deflateEncoder.ts +3 -8
- package/src/domain/deflate/deflateWorker.ts +8 -13
- package/src/domain/deflate/index.ts +1 -0
- package/src/domain/getSessionReplayLink.ts +15 -11
- package/src/domain/profiling/actionHistory.ts +66 -0
- package/src/domain/profiling/{profiler.ts → kubesenseProfiler.ts} +166 -79
- package/src/domain/profiling/longTaskHistory.ts +45 -0
- package/src/domain/profiling/profilerDebugIds.ts +17 -0
- package/src/domain/profiling/profilingContext.ts +8 -3
- package/src/domain/profiling/profilingSupported.ts +2 -7
- package/src/domain/profiling/quotaCheck.ts +89 -0
- package/src/domain/profiling/test-utils/mockedTrace.ts +1 -2
- package/src/domain/profiling/transport/buildProfileEvent.ts +143 -0
- package/src/domain/profiling/transport/formDataEmitter.ts +17 -0
- package/src/domain/profiling/transport/profilingBridge.ts +9 -0
- package/src/domain/profiling/{types/rumProfiler.types.ts → types.ts} +14 -26
- package/src/domain/profiling/vitalHistory.ts +106 -0
- package/src/domain/record/assembly.ts +5 -3
- package/src/domain/record/canvas/canvasHash.ts +54 -0
- package/src/domain/record/canvas/canvasManager.ts +175 -0
- package/src/domain/record/canvas/canvasSnapshot.ts +52 -0
- package/src/domain/record/canvas/canvasUtils.ts +11 -0
- package/src/domain/record/encoding/changeDecoder.ts +287 -0
- package/src/domain/record/encoding/changeEncoder.ts +327 -0
- package/src/domain/record/encoding/index.ts +19 -0
- package/src/domain/record/encoding/itemIds.ts +84 -0
- package/src/domain/record/encoding/roles.ts +136 -0
- package/src/domain/record/encoding/stringIds.ts +70 -0
- package/src/domain/record/encoding/stringTable.ts +68 -0
- package/src/domain/record/index.ts +5 -2
- package/src/domain/record/internalApi.ts +21 -18
- package/src/domain/record/mutationBatch.ts +14 -3
- package/src/domain/record/record.ts +35 -16
- package/src/domain/record/record.types.ts +1 -0
- package/src/domain/record/recordingScope.ts +28 -5
- package/src/domain/record/serialization/index.ts +4 -2
- package/src/domain/record/serialization/insertionCursor.ts +131 -0
- package/src/domain/record/serialization/serialization.types.ts +0 -16
- package/src/domain/record/serialization/serializationTransaction.ts +191 -37
- package/src/domain/record/serialization/serializationUtils.ts +1 -15
- package/src/domain/record/serialization/serializeAttributes.ts +36 -32
- package/src/domain/record/serialization/serializeFullSnapshot.ts +26 -0
- package/src/domain/record/serialization/serializeMutations.ts +357 -0
- package/src/domain/record/serialization/serializeNode.ts +200 -164
- package/src/domain/record/shadowRootsController.ts +4 -3
- package/src/domain/record/startFullSnapshots.ts +28 -41
- package/src/domain/record/trackers/index.ts +2 -1
- package/src/domain/record/trackers/trackCanvasCapture.ts +137 -0
- package/src/domain/record/trackers/trackCanvasContent.ts +46 -0
- package/src/domain/record/trackers/trackFocus.ts +4 -4
- package/src/domain/record/trackers/trackInput.ts +146 -41
- package/src/domain/record/trackers/trackMediaInteraction.ts +0 -1
- package/src/domain/record/trackers/trackMouseInteraction.ts +1 -2
- package/src/domain/record/trackers/trackMove.ts +0 -1
- package/src/domain/record/trackers/trackMutation.ts +17 -355
- package/src/domain/record/trackers/trackScroll.ts +1 -1
- package/src/domain/record/trackers/trackStyleSheet.ts +1 -1
- package/src/domain/record/trackers/trackViewEnd.ts +1 -1
- package/src/domain/record/trackers/trackViewportResize.ts +7 -16
- package/src/domain/record/trackers/tracker.types.ts +1 -1
- package/src/domain/replayStats.ts +5 -0
- package/src/domain/scriptLoadingError.ts +2 -1
- package/src/domain/segmentCollection/buildResourcePayload.ts +20 -0
- package/src/domain/segmentCollection/index.ts +3 -0
- package/src/domain/segmentCollection/replayResourceCollection.ts +79 -0
- package/src/domain/segmentCollection/segment.ts +2 -1
- package/src/domain/segmentCollection/segmentCollection.ts +14 -13
- package/src/domain/segmentCollection/startDroppedSegmentRecovery.ts +37 -0
- package/src/domain/segmentCollection/startSegmentTelemetry.ts +16 -2
- package/src/domain/startRecorderInitTelemetry.ts +5 -3
- package/src/entries/internal.ts +13 -2
- package/src/entries/internalSynthetics.ts +3 -4
- package/src/entries/main.ts +23 -14
- package/src/types/index.ts +1 -0
- package/src/types/profiling.ts +315 -0
- package/src/types/sessionReplay.ts +395 -3
- package/src/types/sessionReplayConstants.ts +109 -0
- package/bundle/chunks/profiler-6f621c66a29d9f39a9bd-kubesense-rum.js +0 -1
- package/bundle/chunks/recorder-c73b8d42b98d4a01f120-kubesense-rum.js +0 -1
- package/cjs/boot/isBrowserSupported.d.ts +0 -4
- package/cjs/boot/isBrowserSupported.js +0 -17
- package/cjs/boot/isBrowserSupported.js.map +0 -1
- package/cjs/boot/startRecording.d.ts +0 -6
- package/cjs/boot/startRecording.js +0 -45
- package/cjs/boot/startRecording.js.map +0 -1
- package/cjs/domain/deflate/index.js.map +0 -1
- package/cjs/domain/profiling/profiler.d.ts +0 -7
- package/cjs/domain/profiling/profiler.js +0 -244
- package/cjs/domain/profiling/profiler.js.map +0 -1
- package/cjs/domain/profiling/test-utils/mockedTrace.js +0 -57
- package/cjs/domain/profiling/test-utils/mockedTrace.js.map +0 -1
- package/cjs/domain/profiling/transport/assembly.d.ts +0 -21
- package/cjs/domain/profiling/transport/assembly.js +0 -45
- package/cjs/domain/profiling/transport/assembly.js.map +0 -1
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.d.ts +0 -25
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.js +0 -50
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.js.map +0 -1
- package/cjs/domain/profiling/types/index.d.ts +0 -2
- package/cjs/domain/profiling/types/index.js +0 -3
- package/cjs/domain/profiling/types/index.js.map +0 -1
- package/cjs/domain/profiling/types/profilerApi.types.d.ts +0 -58
- package/cjs/domain/profiling/types/profilerApi.types.js +0 -5
- package/cjs/domain/profiling/types/profilerApi.types.js.map +0 -1
- package/cjs/domain/profiling/types/rumProfiler.types.js +0 -3
- package/cjs/domain/profiling/types/rumProfiler.types.js.map +0 -1
- package/cjs/domain/profiling/utils/getNumberOfSamples.d.ts +0 -7
- package/cjs/domain/profiling/utils/getNumberOfSamples.js +0 -18
- package/cjs/domain/profiling/utils/getNumberOfSamples.js.map +0 -1
- package/cjs/domain/record/eventIds.d.ts +0 -4
- package/cjs/domain/record/eventIds.js +0 -16
- package/cjs/domain/record/eventIds.js.map +0 -1
- package/cjs/domain/record/index.js.map +0 -1
- package/cjs/domain/record/nodeIds.d.ts +0 -15
- package/cjs/domain/record/nodeIds.js +0 -32
- package/cjs/domain/record/nodeIds.js.map +0 -1
- package/cjs/domain/record/record.types.js +0 -3
- package/cjs/domain/record/record.types.js.map +0 -1
- package/cjs/domain/record/serialization/index.js.map +0 -1
- package/cjs/domain/record/serialization/serialization.types.js +0 -3
- package/cjs/domain/record/serialization/serialization.types.js.map +0 -1
- package/cjs/domain/record/serialization/serializeDocument.d.ts +0 -3
- package/cjs/domain/record/serialization/serializeDocument.js +0 -11
- package/cjs/domain/record/serialization/serializeDocument.js.map +0 -1
- package/cjs/domain/record/serialization/serializeStyleSheets.d.ts +0 -2
- package/cjs/domain/record/serialization/serializeStyleSheets.js +0 -19
- package/cjs/domain/record/serialization/serializeStyleSheets.js.map +0 -1
- package/cjs/domain/record/trackers/index.js.map +0 -1
- package/cjs/domain/record/trackers/trackFrustration.d.ts +0 -7
- package/cjs/domain/record/trackers/trackFrustration.js +0 -31
- package/cjs/domain/record/trackers/trackFrustration.js.map +0 -1
- package/cjs/domain/record/trackers/tracker.types.js +0 -3
- package/cjs/domain/record/trackers/tracker.types.js.map +0 -1
- package/cjs/domain/segmentCollection/index.js.map +0 -1
- package/cjs/entries/internal.js.map +0 -1
- package/cjs/types/index.js +0 -18
- package/cjs/types/index.js.map +0 -1
- package/cjs/types/sessionReplay.js +0 -7
- package/cjs/types/sessionReplay.js.map +0 -1
- package/esm/boot/isBrowserSupported.d.ts +0 -4
- package/esm/boot/isBrowserSupported.js +0 -14
- package/esm/boot/isBrowserSupported.js.map +0 -1
- package/esm/boot/lazyLoadProfiler.d.ts +0 -4
- package/esm/boot/lazyLoadProfiler.js +0 -18
- package/esm/boot/lazyLoadProfiler.js.map +0 -1
- package/esm/boot/lazyLoadRecorder.d.ts +0 -4
- package/esm/boot/lazyLoadRecorder.js +0 -18
- package/esm/boot/lazyLoadRecorder.js.map +0 -1
- package/esm/boot/postStartStrategy.d.ts +0 -33
- package/esm/boot/postStartStrategy.js +0 -115
- package/esm/boot/postStartStrategy.js.map +0 -1
- package/esm/boot/preStartStrategy.d.ts +0 -6
- package/esm/boot/preStartStrategy.js +0 -21
- package/esm/boot/preStartStrategy.js.map +0 -1
- package/esm/boot/profilerApi.d.ts +0 -2
- package/esm/boot/profilerApi.js +0 -50
- package/esm/boot/profilerApi.js.map +0 -1
- package/esm/boot/recorderApi.d.ts +0 -4
- package/esm/boot/recorderApi.js +0 -70
- package/esm/boot/recorderApi.js.map +0 -1
- package/esm/boot/startRecording.d.ts +0 -6
- package/esm/boot/startRecording.js +0 -42
- package/esm/boot/startRecording.js.map +0 -1
- package/esm/domain/deflate/deflateEncoder.d.ts +0 -3
- package/esm/domain/deflate/deflateEncoder.js +0 -107
- package/esm/domain/deflate/deflateEncoder.js.map +0 -1
- package/esm/domain/deflate/deflateWorker.d.ts +0 -30
- package/esm/domain/deflate/deflateWorker.js +0 -97
- package/esm/domain/deflate/deflateWorker.js.map +0 -1
- package/esm/domain/deflate/index.d.ts +0 -3
- package/esm/domain/deflate/index.js +0 -3
- package/esm/domain/deflate/index.js.map +0 -1
- package/esm/domain/getSessionReplayLink.d.ts +0 -2
- package/esm/domain/getSessionReplayLink.js +0 -32
- package/esm/domain/getSessionReplayLink.js.map +0 -1
- package/esm/domain/profiling/profiler.d.ts +0 -7
- package/esm/domain/profiling/profiler.js +0 -240
- package/esm/domain/profiling/profiler.js.map +0 -1
- package/esm/domain/profiling/profilingContext.d.ts +0 -6
- package/esm/domain/profiling/profilingContext.js +0 -25
- package/esm/domain/profiling/profilingContext.js.map +0 -1
- package/esm/domain/profiling/profilingSupported.d.ts +0 -1
- package/esm/domain/profiling/profilingSupported.js +0 -8
- package/esm/domain/profiling/profilingSupported.js.map +0 -1
- package/esm/domain/profiling/test-utils/mockedTrace.d.ts +0 -3
- package/esm/domain/profiling/test-utils/mockedTrace.js +0 -54
- package/esm/domain/profiling/test-utils/mockedTrace.js.map +0 -1
- package/esm/domain/profiling/transport/assembly.d.ts +0 -21
- package/esm/domain/profiling/transport/assembly.js +0 -42
- package/esm/domain/profiling/transport/assembly.js.map +0 -1
- package/esm/domain/profiling/transport/buildProfileEventAttributes.d.ts +0 -25
- package/esm/domain/profiling/transport/buildProfileEventAttributes.js +0 -47
- package/esm/domain/profiling/transport/buildProfileEventAttributes.js.map +0 -1
- package/esm/domain/profiling/types/index.d.ts +0 -2
- package/esm/domain/profiling/types/index.js +0 -2
- package/esm/domain/profiling/types/index.js.map +0 -1
- package/esm/domain/profiling/types/profilerApi.types.d.ts +0 -58
- package/esm/domain/profiling/types/profilerApi.types.js +0 -4
- package/esm/domain/profiling/types/profilerApi.types.js.map +0 -1
- package/esm/domain/profiling/types/rumProfiler.types.d.ts +0 -72
- package/esm/domain/profiling/types/rumProfiler.types.js +0 -2
- package/esm/domain/profiling/types/rumProfiler.types.js.map +0 -1
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.d.ts +0 -1
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.js +0 -3
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.js.map +0 -1
- package/esm/domain/profiling/utils/getDefaultViewName.d.ts +0 -1
- package/esm/domain/profiling/utils/getDefaultViewName.js +0 -11
- package/esm/domain/profiling/utils/getDefaultViewName.js.map +0 -1
- package/esm/domain/profiling/utils/getNumberOfSamples.d.ts +0 -7
- package/esm/domain/profiling/utils/getNumberOfSamples.js +0 -15
- package/esm/domain/profiling/utils/getNumberOfSamples.js.map +0 -1
- package/esm/domain/record/assembly.d.ts +0 -2
- package/esm/domain/record/assembly.js +0 -13
- package/esm/domain/record/assembly.js.map +0 -1
- package/esm/domain/record/elementsScrollPositions.d.ts +0 -10
- package/esm/domain/record/elementsScrollPositions.js +0 -20
- package/esm/domain/record/elementsScrollPositions.js.map +0 -1
- package/esm/domain/record/eventIds.d.ts +0 -4
- package/esm/domain/record/eventIds.js +0 -13
- package/esm/domain/record/eventIds.js.map +0 -1
- package/esm/domain/record/eventsUtils.d.ts +0 -2
- package/esm/domain/record/eventsUtils.js +0 -11
- package/esm/domain/record/eventsUtils.js.map +0 -1
- package/esm/domain/record/index.d.ts +0 -7
- package/esm/domain/record/index.js +0 -6
- package/esm/domain/record/index.js.map +0 -1
- package/esm/domain/record/internalApi.d.ts +0 -22
- package/esm/domain/record/internalApi.js +0 -53
- package/esm/domain/record/internalApi.js.map +0 -1
- package/esm/domain/record/mutationBatch.d.ts +0 -12
- package/esm/domain/record/mutationBatch.js +0 -40
- package/esm/domain/record/mutationBatch.js.map +0 -1
- package/esm/domain/record/nodeIds.d.ts +0 -15
- package/esm/domain/record/nodeIds.js +0 -29
- package/esm/domain/record/nodeIds.js.map +0 -1
- package/esm/domain/record/record.d.ts +0 -16
- package/esm/domain/record/record.js +0 -54
- package/esm/domain/record/record.js.map +0 -1
- package/esm/domain/record/record.types.d.ts +0 -4
- package/esm/domain/record/record.types.js +0 -2
- package/esm/domain/record/record.types.js.map +0 -1
- package/esm/domain/record/recordingScope.d.ts +0 -19
- package/esm/domain/record/recordingScope.js +0 -10
- package/esm/domain/record/recordingScope.js.map +0 -1
- package/esm/domain/record/serialization/index.d.ts +0 -8
- package/esm/domain/record/serialization/index.js +0 -7
- package/esm/domain/record/serialization/index.js.map +0 -1
- package/esm/domain/record/serialization/serialization.types.d.ts +0 -28
- package/esm/domain/record/serialization/serialization.types.js +0 -2
- package/esm/domain/record/serialization/serialization.types.js.map +0 -1
- package/esm/domain/record/serialization/serializationStats.d.ts +0 -12
- package/esm/domain/record/serialization/serializationStats.js +0 -27
- package/esm/domain/record/serialization/serializationStats.js.map +0 -1
- package/esm/domain/record/serialization/serializationTransaction.d.ts +0 -45
- package/esm/domain/record/serialization/serializationTransaction.js +0 -35
- package/esm/domain/record/serialization/serializationTransaction.js.map +0 -1
- package/esm/domain/record/serialization/serializationUtils.d.ts +0 -18
- package/esm/domain/record/serialization/serializationUtils.js +0 -80
- package/esm/domain/record/serialization/serializationUtils.js.map +0 -1
- package/esm/domain/record/serialization/serializeAttribute.d.ts +0 -4
- package/esm/domain/record/serialization/serializeAttribute.js +0 -38
- package/esm/domain/record/serialization/serializeAttribute.js.map +0 -1
- package/esm/domain/record/serialization/serializeAttributes.d.ts +0 -7
- package/esm/domain/record/serialization/serializeAttributes.js +0 -161
- package/esm/domain/record/serialization/serializeAttributes.js.map +0 -1
- package/esm/domain/record/serialization/serializeDocument.d.ts +0 -3
- package/esm/domain/record/serialization/serializeDocument.js +0 -8
- package/esm/domain/record/serialization/serializeDocument.js.map +0 -1
- package/esm/domain/record/serialization/serializeNode.d.ts +0 -7
- package/esm/domain/record/serialization/serializeNode.js +0 -149
- package/esm/domain/record/serialization/serializeNode.js.map +0 -1
- package/esm/domain/record/serialization/serializeStyleSheets.d.ts +0 -2
- package/esm/domain/record/serialization/serializeStyleSheets.js +0 -16
- package/esm/domain/record/serialization/serializeStyleSheets.js.map +0 -1
- package/esm/domain/record/shadowRootsController.d.ts +0 -11
- package/esm/domain/record/shadowRootsController.js +0 -41
- package/esm/domain/record/shadowRootsController.js.map +0 -1
- package/esm/domain/record/startFullSnapshots.d.ts +0 -9
- package/esm/domain/record/startFullSnapshots.js +0 -55
- package/esm/domain/record/startFullSnapshots.js.map +0 -1
- package/esm/domain/record/trackers/index.d.ts +0 -12
- package/esm/domain/record/trackers/index.js +0 -12
- package/esm/domain/record/trackers/index.js.map +0 -1
- package/esm/domain/record/trackers/trackFocus.d.ts +0 -5
- package/esm/domain/record/trackers/trackFocus.js +0 -12
- package/esm/domain/record/trackers/trackFocus.js.map +0 -1
- package/esm/domain/record/trackers/trackFrustration.d.ts +0 -7
- package/esm/domain/record/trackers/trackFrustration.js +0 -28
- package/esm/domain/record/trackers/trackFrustration.js.map +0 -1
- package/esm/domain/record/trackers/trackInput.d.ts +0 -4
- package/esm/domain/record/trackers/trackInput.js +0 -101
- package/esm/domain/record/trackers/trackInput.js.map +0 -1
- package/esm/domain/record/trackers/trackMediaInteraction.d.ts +0 -5
- package/esm/domain/record/trackers/trackMediaInteraction.js +0 -26
- package/esm/domain/record/trackers/trackMediaInteraction.js.map +0 -1
- package/esm/domain/record/trackers/trackMouseInteraction.d.ts +0 -5
- package/esm/domain/record/trackers/trackMouseInteraction.js +0 -56
- package/esm/domain/record/trackers/trackMouseInteraction.js.map +0 -1
- package/esm/domain/record/trackers/trackMove.d.ts +0 -9
- package/esm/domain/record/trackers/trackMove.js +0 -51
- package/esm/domain/record/trackers/trackMove.js.map +0 -1
- package/esm/domain/record/trackers/trackMutation.d.ts +0 -11
- package/esm/domain/record/trackers/trackMutation.js +0 -266
- package/esm/domain/record/trackers/trackMutation.js.map +0 -1
- package/esm/domain/record/trackers/trackScroll.d.ts +0 -5
- package/esm/domain/record/trackers/trackScroll.js +0 -45
- package/esm/domain/record/trackers/trackScroll.js.map +0 -1
- package/esm/domain/record/trackers/trackStyleSheet.d.ts +0 -6
- package/esm/domain/record/trackers/trackStyleSheet.js +0 -85
- package/esm/domain/record/trackers/trackStyleSheet.js.map +0 -1
- package/esm/domain/record/trackers/trackViewEnd.d.ts +0 -5
- package/esm/domain/record/trackers/trackViewEnd.js +0 -17
- package/esm/domain/record/trackers/trackViewEnd.js.map +0 -1
- package/esm/domain/record/trackers/trackViewportResize.d.ts +0 -6
- package/esm/domain/record/trackers/trackViewportResize.js +0 -42
- package/esm/domain/record/trackers/trackViewportResize.js.map +0 -1
- package/esm/domain/record/trackers/tracker.types.d.ts +0 -3
- package/esm/domain/record/trackers/tracker.types.js +0 -2
- package/esm/domain/record/trackers/tracker.types.js.map +0 -1
- package/esm/domain/record/viewports.d.ts +0 -20
- package/esm/domain/record/viewports.js +0 -55
- package/esm/domain/record/viewports.js.map +0 -1
- package/esm/domain/replayStats.d.ts +0 -8
- package/esm/domain/replayStats.js +0 -51
- package/esm/domain/replayStats.js.map +0 -1
- package/esm/domain/scriptLoadingError.d.ts +0 -6
- package/esm/domain/scriptLoadingError.js +0 -23
- package/esm/domain/scriptLoadingError.js.map +0 -1
- package/esm/domain/segmentCollection/buildReplayPayload.d.ts +0 -15
- package/esm/domain/segmentCollection/buildReplayPayload.js +0 -23
- package/esm/domain/segmentCollection/buildReplayPayload.js.map +0 -1
- package/esm/domain/segmentCollection/index.d.ts +0 -4
- package/esm/domain/segmentCollection/index.js +0 -4
- package/esm/domain/segmentCollection/index.js.map +0 -1
- package/esm/domain/segmentCollection/segment.d.ts +0 -16
- package/esm/domain/segmentCollection/segment.js +0 -46
- package/esm/domain/segmentCollection/segment.js.map +0 -1
- package/esm/domain/segmentCollection/segmentCollection.d.ts +0 -31
- package/esm/domain/segmentCollection/segmentCollection.js +0 -106
- package/esm/domain/segmentCollection/segmentCollection.js.map +0 -1
- package/esm/domain/segmentCollection/startSegmentTelemetry.d.ts +0 -6
- package/esm/domain/segmentCollection/startSegmentTelemetry.js +0 -44
- package/esm/domain/segmentCollection/startSegmentTelemetry.js.map +0 -1
- package/esm/domain/startRecordBridge.d.ts +0 -5
- package/esm/domain/startRecordBridge.js +0 -14
- package/esm/domain/startRecordBridge.js.map +0 -1
- package/esm/domain/startRecorderInitTelemetry.d.ts +0 -15
- package/esm/domain/startRecorderInitTelemetry.js +0 -52
- package/esm/domain/startRecorderInitTelemetry.js.map +0 -1
- package/esm/entries/internal.d.ts +0 -11
- package/esm/entries/internal.js +0 -4
- package/esm/entries/internal.js.map +0 -1
- package/esm/entries/internalSynthetics.d.ts +0 -2
- package/esm/entries/internalSynthetics.js +0 -23
- package/esm/entries/internalSynthetics.js.map +0 -1
- package/esm/entries/main.d.ts +0 -23
- package/esm/entries/main.js +0 -31
- package/esm/entries/main.js.map +0 -1
- package/esm/types/index.d.ts +0 -2
- package/esm/types/index.js +0 -2
- package/esm/types/index.js.map +0 -1
- package/esm/types/sessionReplay.d.ts +0 -703
- package/esm/types/sessionReplay.js +0 -6
- package/esm/types/sessionReplay.js.map +0 -1
- package/esm/types/sessionReplayConstants.d.ts +0 -49
- package/esm/types/sessionReplayConstants.js +0 -46
- package/esm/types/sessionReplayConstants.js.map +0 -1
- package/src/boot/isBrowserSupported.ts +0 -14
- package/src/boot/startRecording.ts +0 -70
- package/src/domain/profiling/transport/assembly.ts +0 -78
- package/src/domain/profiling/transport/buildProfileEventAttributes.ts +0 -66
- package/src/domain/profiling/types/index.ts +0 -2
- package/src/domain/profiling/types/profilerApi.types.ts +0 -87
- package/src/domain/profiling/utils/getNumberOfSamples.ts +0 -16
- package/src/domain/record/eventIds.ts +0 -17
- package/src/domain/record/nodeIds.ts +0 -46
- package/src/domain/record/serialization/serializeDocument.ts +0 -13
- package/src/domain/record/serialization/serializeStyleSheets.ts +0 -18
- package/src/domain/record/trackers/trackFrustration.ts +0 -41
|
@@ -3,227 +3,263 @@ import {
|
|
|
3
3
|
getNodeSelfPrivacyLevel,
|
|
4
4
|
getTextContent,
|
|
5
5
|
isNodeShadowRoot,
|
|
6
|
-
hasChildNodes,
|
|
7
6
|
forEachChildNodes,
|
|
8
7
|
NodePrivacyLevel,
|
|
9
8
|
PRIVACY_ATTR_NAME,
|
|
10
9
|
PRIVACY_ATTR_VALUE_HIDDEN,
|
|
10
|
+
getScrollX,
|
|
11
|
+
getScrollY,
|
|
12
|
+
isElementNode,
|
|
11
13
|
} from '@kubesense/kubesense-browser-rum-core'
|
|
12
|
-
import type {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
TextNode,
|
|
20
|
-
} from '../../../types'
|
|
21
|
-
import { NodeType } from '../../../types'
|
|
22
|
-
import { getValidTagName } from './serializationUtils'
|
|
23
|
-
import type { ParentNodePrivacyLevel } from './serialization.types'
|
|
24
|
-
import { serializeStyleSheets } from './serializeStyleSheets'
|
|
25
|
-
import { serializeAttributes } from './serializeAttributes'
|
|
14
|
+
import type { RoleAnnotatedStringLiteral } from '../../../types'
|
|
15
|
+
import { MediaInteractionType, StringRole } from '../../../types'
|
|
16
|
+
import type { NodeId, StyleSheetId } from '../encoding'
|
|
17
|
+
import { createAttributeAssignment, createString } from '../encoding'
|
|
18
|
+
import { isCanvasElement } from '../canvas/canvasUtils'
|
|
19
|
+
import { CanvasStatus } from '../canvas/canvasManager'
|
|
20
|
+
import type { InsertionCursor } from './insertionCursor'
|
|
26
21
|
import type { SerializationTransaction } from './serializationTransaction'
|
|
22
|
+
import { serializeDOMAttributes, serializeVirtualAttributes } from './serializeAttributes'
|
|
23
|
+
import { normalizedTagName } from './serializationUtils'
|
|
27
24
|
|
|
28
25
|
export function serializeNode(
|
|
29
|
-
|
|
30
|
-
parentNodePrivacyLevel: ParentNodePrivacyLevel,
|
|
31
|
-
transaction: SerializationTransaction
|
|
32
|
-
): (SerializedNodeWithId & ElementNode) | null
|
|
33
|
-
export function serializeNode(
|
|
26
|
+
cursor: InsertionCursor,
|
|
34
27
|
node: Node,
|
|
35
|
-
|
|
28
|
+
parentPrivacyLevel: NodePrivacyLevel,
|
|
36
29
|
transaction: SerializationTransaction
|
|
37
|
-
):
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
): void {
|
|
31
|
+
// Ignore the children of <style> elements; the CSS rules they contain are already
|
|
32
|
+
// serialized as StyleSheetSnapshots.
|
|
33
|
+
if (node.parentNode?.nodeName === 'STYLE') {
|
|
34
|
+
return
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Never serialize the descendants of HIDDEN or IGNORE'd elements.
|
|
38
|
+
if (parentPrivacyLevel === NodePrivacyLevel.HIDDEN || parentPrivacyLevel === NodePrivacyLevel.IGNORE) {
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let privacyLevel: NodePrivacyLevel
|
|
43
|
+
|
|
44
|
+
const selfPrivacyLevel = getNodeSelfPrivacyLevel(node)
|
|
45
|
+
if (selfPrivacyLevel) {
|
|
46
|
+
privacyLevel = reducePrivacyLevel(selfPrivacyLevel, parentPrivacyLevel)
|
|
47
|
+
} else {
|
|
48
|
+
privacyLevel = parentPrivacyLevel
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (privacyLevel === NodePrivacyLevel.HIDDEN) {
|
|
52
|
+
serializeHiddenNodePlaceholder(cursor, node, transaction)
|
|
53
|
+
return
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Totally ignore risky or unwanted elements. (e.g. <script>, some <link> and <meta> elements)
|
|
57
|
+
if (privacyLevel === NodePrivacyLevel.IGNORE) {
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
|
|
43
61
|
switch (node.nodeType) {
|
|
62
|
+
case node.CDATA_SECTION_NODE:
|
|
63
|
+
serializeCDataNode(cursor, node as CDATASection, transaction)
|
|
64
|
+
break
|
|
44
65
|
case node.DOCUMENT_NODE:
|
|
45
|
-
|
|
66
|
+
serializeDocumentNode(cursor, node as Document, transaction)
|
|
67
|
+
break
|
|
46
68
|
case node.DOCUMENT_FRAGMENT_NODE:
|
|
47
|
-
|
|
69
|
+
serializeDocumentFragmentNode(cursor, node as DocumentFragment, transaction)
|
|
70
|
+
break
|
|
48
71
|
case node.DOCUMENT_TYPE_NODE:
|
|
49
|
-
|
|
72
|
+
serializeDocumentTypeNode(cursor, node as DocumentType, transaction)
|
|
73
|
+
break
|
|
50
74
|
case node.ELEMENT_NODE:
|
|
51
|
-
|
|
75
|
+
serializeElementNode(cursor, node as Element, privacyLevel, transaction)
|
|
76
|
+
break
|
|
52
77
|
case node.TEXT_NODE:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return serializeCDataNode(node as CDATASection, transaction)
|
|
78
|
+
serializeTextNode(cursor, node as Text, privacyLevel, transaction)
|
|
79
|
+
break
|
|
56
80
|
default:
|
|
57
|
-
return
|
|
81
|
+
return
|
|
58
82
|
}
|
|
59
|
-
}
|
|
60
83
|
|
|
61
|
-
|
|
62
|
-
node
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
84
|
+
// If this node can't have children, we're done.
|
|
85
|
+
switch (node.nodeType) {
|
|
86
|
+
case node.CDATA_SECTION_NODE:
|
|
87
|
+
case node.DOCUMENT_TYPE_NODE:
|
|
88
|
+
case node.TEXT_NODE:
|
|
89
|
+
return
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
cursor.descend()
|
|
67
93
|
forEachChildNodes(node, (childNode) => {
|
|
68
|
-
|
|
69
|
-
if (serializedChildNode) {
|
|
70
|
-
result.push(serializedChildNode)
|
|
71
|
-
}
|
|
94
|
+
serializeNode(cursor, childNode, privacyLevel, transaction)
|
|
72
95
|
})
|
|
73
|
-
|
|
96
|
+
cursor.ascend()
|
|
74
97
|
}
|
|
75
98
|
|
|
76
|
-
|
|
99
|
+
function serializeDocumentNode(
|
|
100
|
+
cursor: InsertionCursor,
|
|
77
101
|
document: Document,
|
|
78
|
-
parentNodePrivacyLevel: ParentNodePrivacyLevel,
|
|
79
102
|
transaction: SerializationTransaction
|
|
80
|
-
):
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
adoptedStyleSheets: serializeStyleSheets(document.adoptedStyleSheets),
|
|
86
|
-
}
|
|
103
|
+
): void {
|
|
104
|
+
const { nodeId, insertionPoint } = cursor.advance(document)
|
|
105
|
+
transaction.addNode(insertionPoint, createString(StringRole.NodeName, '#document'))
|
|
106
|
+
transaction.setScrollPosition(nodeId, getScrollX(), getScrollY())
|
|
107
|
+
serializeStyleSheets(document.adoptedStyleSheets, nodeId, transaction)
|
|
87
108
|
}
|
|
88
109
|
|
|
89
110
|
function serializeDocumentFragmentNode(
|
|
90
|
-
|
|
91
|
-
|
|
111
|
+
cursor: InsertionCursor,
|
|
112
|
+
documentFragment: DocumentFragment,
|
|
92
113
|
transaction: SerializationTransaction
|
|
93
|
-
):
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
114
|
+
): void {
|
|
115
|
+
const { nodeId, insertionPoint } = cursor.advance(documentFragment)
|
|
116
|
+
const isShadowRoot = isNodeShadowRoot(documentFragment)
|
|
117
|
+
if (!isShadowRoot) {
|
|
118
|
+
transaction.addNode(insertionPoint, createString(StringRole.NodeName, '#document-fragment'))
|
|
119
|
+
return
|
|
97
120
|
}
|
|
98
121
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
childNodes: serializeChildNodes(element, parentNodePrivacyLevel, transaction),
|
|
103
|
-
isShadowRoot,
|
|
104
|
-
adoptedStyleSheets: isShadowRoot ? serializeStyleSheets(element.adoptedStyleSheets) : undefined,
|
|
105
|
-
}
|
|
122
|
+
transaction.addNode(insertionPoint, createString(StringRole.NodeName, '#shadow-root'))
|
|
123
|
+
transaction.scope.shadowRootsController.addShadowRoot(documentFragment, transaction.scope)
|
|
124
|
+
serializeStyleSheets(documentFragment.adoptedStyleSheets, nodeId, transaction)
|
|
106
125
|
}
|
|
107
126
|
|
|
108
127
|
function serializeDocumentTypeNode(
|
|
128
|
+
cursor: InsertionCursor,
|
|
109
129
|
documentType: DocumentType,
|
|
110
130
|
transaction: SerializationTransaction
|
|
111
|
-
):
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
131
|
+
): void {
|
|
132
|
+
const { insertionPoint } = cursor.advance(documentType)
|
|
133
|
+
transaction.addNode(
|
|
134
|
+
insertionPoint,
|
|
135
|
+
createString(StringRole.NodeName, '#doctype'),
|
|
136
|
+
createString(StringRole.AttributeValue, documentType.name),
|
|
137
|
+
createString(StringRole.AttributeValue, documentType.publicId),
|
|
138
|
+
createString(StringRole.Url, documentType.systemId)
|
|
139
|
+
)
|
|
119
140
|
}
|
|
120
141
|
|
|
121
|
-
/**
|
|
122
|
-
* Serializing Element nodes involves capturing:
|
|
123
|
-
* 1. HTML ATTRIBUTES:
|
|
124
|
-
* 2. JS STATE:
|
|
125
|
-
* - scroll offsets
|
|
126
|
-
* - Form fields (input value, checkbox checked, option selection, range)
|
|
127
|
-
* - Canvas state,
|
|
128
|
-
* - Media (video/audio) play mode + currentTime
|
|
129
|
-
* - iframe contents
|
|
130
|
-
* - webcomponents
|
|
131
|
-
* 3. CUSTOM PROPERTIES:
|
|
132
|
-
* - height+width for when `hidden` to cover the element
|
|
133
|
-
* 4. EXCLUDED INTERACTION STATE:
|
|
134
|
-
* - focus (possible, but not worth perf impact)
|
|
135
|
-
* - hover (tracked only via mouse activity)
|
|
136
|
-
* - fullscreen mode
|
|
137
|
-
*/
|
|
138
|
-
|
|
139
142
|
function serializeElementNode(
|
|
143
|
+
cursor: InsertionCursor,
|
|
140
144
|
element: Element,
|
|
141
|
-
|
|
145
|
+
privacyLevel: NodePrivacyLevel,
|
|
142
146
|
transaction: SerializationTransaction
|
|
143
|
-
):
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
// For performance reason, we don't use getNodePrivacyLevel directly: we leverage the
|
|
148
|
-
// parentNodePrivacyLevel option to avoid iterating over all parents
|
|
149
|
-
const nodePrivacyLevel = reducePrivacyLevel(getNodeSelfPrivacyLevel(element), parentNodePrivacyLevel)
|
|
150
|
-
|
|
151
|
-
if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {
|
|
152
|
-
const { width, height } = element.getBoundingClientRect()
|
|
153
|
-
return {
|
|
154
|
-
type: NodeType.Element,
|
|
155
|
-
id: transaction.assignId(element),
|
|
156
|
-
tagName,
|
|
157
|
-
attributes: {
|
|
158
|
-
rr_width: `${width}px`,
|
|
159
|
-
rr_height: `${height}px`,
|
|
160
|
-
[PRIVACY_ATTR_NAME]: PRIVACY_ATTR_VALUE_HIDDEN,
|
|
161
|
-
},
|
|
162
|
-
childNodes: [],
|
|
163
|
-
isSVG,
|
|
164
|
-
}
|
|
165
|
-
}
|
|
147
|
+
): void {
|
|
148
|
+
const { nodeId, insertionPoint } = cursor.advance(element)
|
|
149
|
+
const domAttributes = serializeDOMAttributes(element, privacyLevel, transaction)
|
|
150
|
+
transaction.addNode(insertionPoint, encodedElementName(element), ...domAttributes)
|
|
166
151
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return null
|
|
152
|
+
if (isCanvasElement(element)) {
|
|
153
|
+
transaction.scope.canvasManager.markCanvas(element, CanvasStatus.Dirty)
|
|
170
154
|
}
|
|
171
155
|
|
|
172
|
-
const
|
|
173
|
-
|
|
156
|
+
const {
|
|
157
|
+
_cssText: cssText,
|
|
158
|
+
rr_mediaState: mediaState,
|
|
159
|
+
rr_scrollLeft: scrollLeft,
|
|
160
|
+
rr_scrollTop: scrollTop,
|
|
161
|
+
} = serializeVirtualAttributes(element, privacyLevel, transaction)
|
|
174
162
|
|
|
175
|
-
|
|
176
|
-
if (
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
) {
|
|
181
|
-
childNodes = serializeChildNodes(element, nodePrivacyLevel, transaction)
|
|
163
|
+
const linkOrStyle = element as HTMLLinkElement | HTMLStyleElement
|
|
164
|
+
if (cssText !== undefined && linkOrStyle.sheet) {
|
|
165
|
+
const sheetId = transaction.scope.styleSheetIds.getOrInsert(linkOrStyle.sheet)
|
|
166
|
+
transaction.addStyleSheet(createString(StringRole.Css, cssText))
|
|
167
|
+
transaction.attachStyleSheets(nodeId, [sheetId])
|
|
182
168
|
}
|
|
183
169
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
attributes,
|
|
189
|
-
childNodes,
|
|
190
|
-
isSVG,
|
|
170
|
+
if (mediaState === 'played') {
|
|
171
|
+
transaction.setMediaPlaybackState(nodeId, MediaInteractionType.Play)
|
|
172
|
+
} else if (mediaState === 'paused') {
|
|
173
|
+
transaction.setMediaPlaybackState(nodeId, MediaInteractionType.Pause)
|
|
191
174
|
}
|
|
192
|
-
}
|
|
193
175
|
|
|
194
|
-
|
|
195
|
-
|
|
176
|
+
if (scrollLeft !== undefined || scrollTop !== undefined) {
|
|
177
|
+
transaction.setScrollPosition(nodeId, scrollLeft || 0, scrollTop || 0)
|
|
178
|
+
}
|
|
196
179
|
}
|
|
197
180
|
|
|
198
|
-
/**
|
|
199
|
-
* Text Nodes are dependant on Element nodes
|
|
200
|
-
* Privacy levels are set on elements so we check the parentElement of a text node
|
|
201
|
-
* for privacy level.
|
|
202
|
-
*/
|
|
203
|
-
|
|
204
181
|
function serializeTextNode(
|
|
182
|
+
cursor: InsertionCursor,
|
|
205
183
|
textNode: Text,
|
|
206
|
-
|
|
184
|
+
privacyLevel: NodePrivacyLevel,
|
|
207
185
|
transaction: SerializationTransaction
|
|
208
|
-
):
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
textContent,
|
|
217
|
-
}
|
|
186
|
+
): void {
|
|
187
|
+
const { insertionPoint } = cursor.advance(textNode)
|
|
188
|
+
const textContent = getTextContent(textNode, privacyLevel)
|
|
189
|
+
transaction.addNode(
|
|
190
|
+
insertionPoint,
|
|
191
|
+
createString(StringRole.NodeName, '#text'),
|
|
192
|
+
createString(StringRole.TextContent, textContent)
|
|
193
|
+
)
|
|
218
194
|
}
|
|
219
195
|
|
|
220
196
|
function serializeCDataNode(
|
|
221
|
-
|
|
197
|
+
cursor: InsertionCursor,
|
|
198
|
+
cdataNode: CDATASection,
|
|
199
|
+
transaction: SerializationTransaction
|
|
200
|
+
): void {
|
|
201
|
+
const { insertionPoint } = cursor.advance(cdataNode)
|
|
202
|
+
transaction.addNode(insertionPoint, createString(StringRole.NodeName, '#cdata-section'))
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function serializeHiddenNodePlaceholder(
|
|
206
|
+
cursor: InsertionCursor,
|
|
207
|
+
node: Node,
|
|
222
208
|
transaction: SerializationTransaction
|
|
223
|
-
):
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
209
|
+
): void {
|
|
210
|
+
// We only generate placeholders for element nodes; other hidden nodes are simply not
|
|
211
|
+
// serialized. (But note that a non-element node can only be hidden if it's a descendant
|
|
212
|
+
// of another hidden node, since only element nodes can have a different privacy level
|
|
213
|
+
// than their parent.)
|
|
214
|
+
if (!isElementNode(node)) {
|
|
215
|
+
return
|
|
228
216
|
}
|
|
217
|
+
|
|
218
|
+
const { nodeId, insertionPoint } = cursor.advance(node)
|
|
219
|
+
transaction.addNode(
|
|
220
|
+
insertionPoint,
|
|
221
|
+
encodedElementName(node),
|
|
222
|
+
createAttributeAssignment(normalizedTagName(node), PRIVACY_ATTR_NAME, PRIVACY_ATTR_VALUE_HIDDEN)
|
|
223
|
+
)
|
|
224
|
+
const { width, height } = node.getBoundingClientRect()
|
|
225
|
+
transaction.setSize(nodeId, width, height)
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function serializeStyleSheets(
|
|
229
|
+
sheets: CSSStyleSheet[] | undefined,
|
|
230
|
+
nodeId: NodeId,
|
|
231
|
+
transaction: SerializationTransaction
|
|
232
|
+
): void {
|
|
233
|
+
if (!sheets || sheets.length === 0) {
|
|
234
|
+
return undefined
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
transaction.attachStyleSheets(
|
|
238
|
+
nodeId,
|
|
239
|
+
sheets.map((sheet) => serializeStyleSheet(sheet, transaction))
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function serializeStyleSheet(sheet: CSSStyleSheet, transaction: SerializationTransaction): StyleSheetId {
|
|
244
|
+
const rules = Array.from(sheet.cssRules || sheet.rules, (rule) => createString(StringRole.Css, rule.cssText))
|
|
245
|
+
const mediaList =
|
|
246
|
+
sheet.media.length > 0 ? Array.from(sheet.media).map((medium) => createString(StringRole.Css, medium)) : undefined
|
|
247
|
+
transaction.addMetric(
|
|
248
|
+
'cssText',
|
|
249
|
+
rules.reduce((totalLength, rule) => totalLength + rule.string.length, 0)
|
|
250
|
+
)
|
|
251
|
+
transaction.addStyleSheet(rules, mediaList, sheet.disabled)
|
|
252
|
+
return transaction.scope.styleSheetIds.getOrInsert(sheet)
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function encodedElementName(element: Element): RoleAnnotatedStringLiteral {
|
|
256
|
+
const nodeName = element.nodeName
|
|
257
|
+
if (isSVGElement(element)) {
|
|
258
|
+
return createString(StringRole.NodeName, `svg>${nodeName}`)
|
|
259
|
+
}
|
|
260
|
+
return createString(StringRole.NodeName, nodeName)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function isSVGElement(element: Element): element is SVGElement {
|
|
264
|
+
return element.namespaceURI === 'http://www.w3.org/2000/svg'
|
|
229
265
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RecordingScope } from './recordingScope.ts'
|
|
2
|
-
import type { EmitRecordCallback, EmitStatsCallback } from './record.types'
|
|
2
|
+
import type { EmitRecordCallback, EmitResourceCallback, EmitStatsCallback } from './record.types'
|
|
3
3
|
import { trackInput, trackMutation, trackScroll } from './trackers'
|
|
4
4
|
|
|
5
5
|
interface ShadowRootController {
|
|
@@ -19,6 +19,7 @@ export interface ShadowRootsController {
|
|
|
19
19
|
|
|
20
20
|
export const initShadowRootsController = (
|
|
21
21
|
emitRecord: EmitRecordCallback,
|
|
22
|
+
emitResource: EmitResourceCallback,
|
|
22
23
|
emitStats: EmitStatsCallback
|
|
23
24
|
): ShadowRootsController => {
|
|
24
25
|
const controllerByShadowRoot = new Map<ShadowRoot, ShadowRootController>()
|
|
@@ -28,9 +29,9 @@ export const initShadowRootsController = (
|
|
|
28
29
|
if (controllerByShadowRoot.has(shadowRoot)) {
|
|
29
30
|
return
|
|
30
31
|
}
|
|
31
|
-
const mutationTracker = trackMutation(shadowRoot, emitRecord, emitStats, scope)
|
|
32
|
+
const mutationTracker = trackMutation(shadowRoot, emitRecord, emitResource, emitStats, scope)
|
|
32
33
|
// The change event does not bubble up across the shadow root, we have to listen on the shadow root
|
|
33
|
-
const inputTracker = trackInput(shadowRoot, emitRecord, scope)
|
|
34
|
+
const inputTracker = trackInput(shadowRoot, emitRecord, emitStats, scope)
|
|
34
35
|
// The scroll event does not bubble up across the shadow root, we have to listen on the shadow root
|
|
35
36
|
const scrollTracker = trackScroll(shadowRoot, emitRecord, scope)
|
|
36
37
|
controllerByShadowRoot.set(shadowRoot, {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { LifeCycleEventType,
|
|
1
|
+
import { LifeCycleEventType, getViewportDimension } from '@kubesense/kubesense-browser-rum-core'
|
|
2
|
+
import { timeStampNow } from '@kubesense/kubesense-js-core/time'
|
|
3
|
+
import type { TimeStamp } from '@kubesense/kubesense-js-core/time'
|
|
2
4
|
import type { LifeCycle } from '@kubesense/kubesense-browser-rum-core'
|
|
3
|
-
import { timeStampNow } from '@kubesense/kubesense-browser-core'
|
|
4
|
-
import type { TimeStamp } from '@kubesense/kubesense-browser-core'
|
|
5
5
|
import { RecordType } from '../../types'
|
|
6
|
-
import
|
|
7
|
-
import { serializeDocument, serializeInTransaction, SerializationKind } from './serialization'
|
|
6
|
+
import { SerializationKind, serializeFullSnapshot } from './serialization'
|
|
8
7
|
import { getVisualViewport } from './viewports'
|
|
9
8
|
import type { RecordingScope } from './recordingScope'
|
|
10
9
|
import type { EmitRecordCallback, EmitStatsCallback } from './record.types'
|
|
@@ -41,44 +40,32 @@ export function takeFullSnapshot(
|
|
|
41
40
|
emitStats: EmitStatsCallback,
|
|
42
41
|
scope: RecordingScope
|
|
43
42
|
): void {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
})
|
|
43
|
+
const { width, height } = getViewportDimension()
|
|
44
|
+
emitRecord({
|
|
45
|
+
data: {
|
|
46
|
+
height,
|
|
47
|
+
href: window.location.href,
|
|
48
|
+
width,
|
|
49
|
+
},
|
|
50
|
+
type: RecordType.Meta,
|
|
51
|
+
timestamp,
|
|
52
|
+
})
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
emitRecord({
|
|
55
|
+
data: {
|
|
56
|
+
has_focus: document.hasFocus(),
|
|
57
|
+
},
|
|
58
|
+
type: RecordType.Focus,
|
|
59
|
+
timestamp,
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
serializeFullSnapshot(timestamp, kind, document, emitRecord, emitStats, scope)
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
left: getScrollX(),
|
|
69
|
-
top: getScrollY(),
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
type: RecordType.FullSnapshot,
|
|
64
|
+
if (window.visualViewport) {
|
|
65
|
+
emitRecord({
|
|
66
|
+
data: getVisualViewport(window.visualViewport),
|
|
67
|
+
type: RecordType.VisualViewport,
|
|
73
68
|
timestamp,
|
|
74
69
|
})
|
|
75
|
-
|
|
76
|
-
if (window.visualViewport) {
|
|
77
|
-
transaction.add({
|
|
78
|
-
data: getVisualViewport(window.visualViewport),
|
|
79
|
-
type: RecordType.VisualViewport,
|
|
80
|
-
timestamp,
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
})
|
|
70
|
+
}
|
|
84
71
|
}
|
|
@@ -5,8 +5,9 @@ export { trackViewportResize, trackVisualViewportResize } from './trackViewportR
|
|
|
5
5
|
export { trackMediaInteraction } from './trackMediaInteraction'
|
|
6
6
|
export { trackStyleSheet } from './trackStyleSheet'
|
|
7
7
|
export { trackFocus } from './trackFocus'
|
|
8
|
-
export { trackFrustration } from './trackFrustration'
|
|
9
8
|
export { trackViewEnd } from './trackViewEnd'
|
|
10
9
|
export { trackInput } from './trackInput'
|
|
11
10
|
export { trackMutation } from './trackMutation'
|
|
11
|
+
export { trackCanvasContent } from './trackCanvasContent'
|
|
12
|
+
export { trackCanvasCapture } from './trackCanvasCapture'
|
|
12
13
|
export type { Tracker } from './tracker.types'
|