@depup/datadog__browser-rum 6.31.0-depup.0
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 +201 -0
- package/README.md +25 -0
- package/bundle/chunks/profiler-9f1c1103f1ef0aa98257-datadog-rum.js +1 -0
- package/bundle/chunks/recorder-926b641c6ef51d09a378-datadog-rum.js +1 -0
- package/bundle/datadog-rum.js +1 -0
- package/changes.json +5 -0
- package/cjs/boot/isBrowserSupported.d.ts +4 -0
- package/cjs/boot/isBrowserSupported.js +17 -0
- package/cjs/boot/isBrowserSupported.js.map +1 -0
- package/cjs/boot/lazyLoadProfiler.d.ts +3 -0
- package/cjs/boot/lazyLoadProfiler.js +56 -0
- package/cjs/boot/lazyLoadProfiler.js.map +1 -0
- package/cjs/boot/lazyLoadRecorder.d.ts +3 -0
- package/cjs/boot/lazyLoadRecorder.js +56 -0
- package/cjs/boot/lazyLoadRecorder.js.map +1 -0
- package/cjs/boot/postStartStrategy.d.ts +33 -0
- package/cjs/boot/postStartStrategy.js +98 -0
- package/cjs/boot/postStartStrategy.js.map +1 -0
- package/cjs/boot/preStartStrategy.d.ts +6 -0
- package/cjs/boot/preStartStrategy.js +24 -0
- package/cjs/boot/preStartStrategy.js.map +1 -0
- package/cjs/boot/profilerApi.d.ts +2 -0
- package/cjs/boot/profilerApi.js +52 -0
- package/cjs/boot/profilerApi.js.map +1 -0
- package/cjs/boot/recorderApi.d.ts +3 -0
- package/cjs/boot/recorderApi.js +71 -0
- package/cjs/boot/recorderApi.js.map +1 -0
- package/cjs/boot/startRecording.d.ts +6 -0
- package/cjs/boot/startRecording.js +45 -0
- package/cjs/boot/startRecording.js.map +1 -0
- package/cjs/domain/deflate/deflateEncoder.d.ts +3 -0
- package/cjs/domain/deflate/deflateEncoder.js +110 -0
- package/cjs/domain/deflate/deflateEncoder.js.map +1 -0
- package/cjs/domain/deflate/deflateWorker.d.ts +29 -0
- package/cjs/domain/deflate/deflateWorker.js +105 -0
- package/cjs/domain/deflate/deflateWorker.js.map +1 -0
- package/cjs/domain/deflate/index.d.ts +3 -0
- package/cjs/domain/deflate/index.js +11 -0
- package/cjs/domain/deflate/index.js.map +1 -0
- package/cjs/domain/getSessionReplayLink.d.ts +2 -0
- package/cjs/domain/getSessionReplayLink.js +35 -0
- package/cjs/domain/getSessionReplayLink.js.map +1 -0
- package/cjs/domain/profiling/actionHistory.d.ts +10 -0
- package/cjs/domain/profiling/actionHistory.js +49 -0
- package/cjs/domain/profiling/actionHistory.js.map +1 -0
- package/cjs/domain/profiling/longTaskHistory.d.ts +11 -0
- package/cjs/domain/profiling/longTaskHistory.js +28 -0
- package/cjs/domain/profiling/longTaskHistory.js.map +1 -0
- package/cjs/domain/profiling/profiler.d.ts +7 -0
- package/cjs/domain/profiling/profiler.js +267 -0
- package/cjs/domain/profiling/profiler.js.map +1 -0
- package/cjs/domain/profiling/profilingContext.d.ts +6 -0
- package/cjs/domain/profiling/profilingContext.js +31 -0
- package/cjs/domain/profiling/profilingContext.js.map +1 -0
- package/cjs/domain/profiling/profilingSupported.d.ts +1 -0
- package/cjs/domain/profiling/profilingSupported.js +11 -0
- package/cjs/domain/profiling/profilingSupported.js.map +1 -0
- package/cjs/domain/profiling/test-utils/mockedTrace.d.ts +3 -0
- package/cjs/domain/profiling/test-utils/mockedTrace.js +57 -0
- package/cjs/domain/profiling/test-utils/mockedTrace.js.map +1 -0
- package/cjs/domain/profiling/transport/assembly.d.ts +7 -0
- package/cjs/domain/profiling/transport/assembly.js +45 -0
- package/cjs/domain/profiling/transport/assembly.js.map +1 -0
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.d.ts +33 -0
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.js +63 -0
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.js.map +1 -0
- package/cjs/domain/profiling/types/index.d.ts +2 -0
- package/cjs/domain/profiling/types/index.js +3 -0
- package/cjs/domain/profiling/types/index.js.map +1 -0
- package/cjs/domain/profiling/types/profilerApi.types.d.ts +58 -0
- package/cjs/domain/profiling/types/profilerApi.types.js +5 -0
- package/cjs/domain/profiling/types/profilerApi.types.js.map +1 -0
- package/cjs/domain/profiling/types/rumProfiler.types.d.ts +55 -0
- package/cjs/domain/profiling/types/rumProfiler.types.js +3 -0
- package/cjs/domain/profiling/types/rumProfiler.types.js.map +1 -0
- package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.d.ts +1 -0
- package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.js +7 -0
- package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.js.map +1 -0
- package/cjs/domain/profiling/utils/getDefaultViewName.d.ts +1 -0
- package/cjs/domain/profiling/utils/getDefaultViewName.js +14 -0
- package/cjs/domain/profiling/utils/getDefaultViewName.js.map +1 -0
- package/cjs/domain/profiling/utils/getNumberOfSamples.d.ts +8 -0
- package/cjs/domain/profiling/utils/getNumberOfSamples.js +19 -0
- package/cjs/domain/profiling/utils/getNumberOfSamples.js.map +1 -0
- package/cjs/domain/profiling/vitalHistory.d.ts +10 -0
- package/cjs/domain/profiling/vitalHistory.js +42 -0
- package/cjs/domain/profiling/vitalHistory.js.map +1 -0
- package/cjs/domain/record/assembly.d.ts +3 -0
- package/cjs/domain/record/assembly.js +16 -0
- package/cjs/domain/record/assembly.js.map +1 -0
- package/cjs/domain/record/elementsScrollPositions.d.ts +10 -0
- package/cjs/domain/record/elementsScrollPositions.js +23 -0
- package/cjs/domain/record/elementsScrollPositions.js.map +1 -0
- package/cjs/domain/record/eventsUtils.d.ts +2 -0
- package/cjs/domain/record/eventsUtils.js +15 -0
- package/cjs/domain/record/eventsUtils.js.map +1 -0
- package/cjs/domain/record/index.d.ts +6 -0
- package/cjs/domain/record/index.js +17 -0
- package/cjs/domain/record/index.js.map +1 -0
- package/cjs/domain/record/internalApi.d.ts +22 -0
- package/cjs/domain/record/internalApi.js +55 -0
- package/cjs/domain/record/internalApi.js.map +1 -0
- package/cjs/domain/record/itemIds.d.ts +40 -0
- package/cjs/domain/record/itemIds.js +58 -0
- package/cjs/domain/record/itemIds.js.map +1 -0
- package/cjs/domain/record/mutationBatch.d.ts +12 -0
- package/cjs/domain/record/mutationBatch.js +44 -0
- package/cjs/domain/record/mutationBatch.js.map +1 -0
- package/cjs/domain/record/record.d.ts +16 -0
- package/cjs/domain/record/record.js +88 -0
- package/cjs/domain/record/record.js.map +1 -0
- package/cjs/domain/record/record.types.d.ts +18 -0
- package/cjs/domain/record/record.types.js +3 -0
- package/cjs/domain/record/record.types.js.map +1 -0
- package/cjs/domain/record/recordingScope.d.ts +24 -0
- package/cjs/domain/record/recordingScope.js +29 -0
- package/cjs/domain/record/recordingScope.js.map +1 -0
- package/cjs/domain/record/serialization/changeEncoder.d.ts +22 -0
- package/cjs/domain/record/serialization/changeEncoder.js +59 -0
- package/cjs/domain/record/serialization/changeEncoder.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/changeConverter.d.ts +10 -0
- package/cjs/domain/record/serialization/conversions/changeConverter.js +216 -0
- package/cjs/domain/record/serialization/conversions/changeConverter.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/changeDecoder.d.ts +16 -0
- package/cjs/domain/record/serialization/conversions/changeDecoder.js +137 -0
- package/cjs/domain/record/serialization/conversions/changeDecoder.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/index.d.ts +7 -0
- package/cjs/domain/record/serialization/conversions/index.js +11 -0
- package/cjs/domain/record/serialization/conversions/index.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/mutationLog.d.ts +15 -0
- package/cjs/domain/record/serialization/conversions/mutationLog.js +36 -0
- package/cjs/domain/record/serialization/conversions/mutationLog.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/nodeIdRemapper.d.ts +10 -0
- package/cjs/domain/record/serialization/conversions/nodeIdRemapper.js +53 -0
- package/cjs/domain/record/serialization/conversions/nodeIdRemapper.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/renderOptions.d.ts +6 -0
- package/cjs/domain/record/serialization/conversions/renderOptions.js +12 -0
- package/cjs/domain/record/serialization/conversions/renderOptions.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/stringTable.d.ts +5 -0
- package/cjs/domain/record/serialization/conversions/stringTable.js +22 -0
- package/cjs/domain/record/serialization/conversions/stringTable.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/vDocument.d.ts +23 -0
- package/cjs/domain/record/serialization/conversions/vDocument.js +176 -0
- package/cjs/domain/record/serialization/conversions/vDocument.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/vNode.d.ts +66 -0
- package/cjs/domain/record/serialization/conversions/vNode.js +285 -0
- package/cjs/domain/record/serialization/conversions/vNode.js.map +1 -0
- package/cjs/domain/record/serialization/conversions/vStyleSheet.d.ts +16 -0
- package/cjs/domain/record/serialization/conversions/vStyleSheet.js +29 -0
- package/cjs/domain/record/serialization/conversions/vStyleSheet.js.map +1 -0
- package/cjs/domain/record/serialization/experimentalFeatures.d.ts +2 -0
- package/cjs/domain/record/serialization/experimentalFeatures.js +16 -0
- package/cjs/domain/record/serialization/experimentalFeatures.js.map +1 -0
- package/cjs/domain/record/serialization/index.d.ts +17 -0
- package/cjs/domain/record/serialization/index.js +37 -0
- package/cjs/domain/record/serialization/index.js.map +1 -0
- package/cjs/domain/record/serialization/insertionCursor.d.ts +57 -0
- package/cjs/domain/record/serialization/insertionCursor.js +68 -0
- package/cjs/domain/record/serialization/insertionCursor.js.map +1 -0
- package/cjs/domain/record/serialization/serialization.types.d.ts +24 -0
- package/cjs/domain/record/serialization/serialization.types.js +3 -0
- package/cjs/domain/record/serialization/serialization.types.js.map +1 -0
- package/cjs/domain/record/serialization/serializationStats.d.ts +12 -0
- package/cjs/domain/record/serialization/serializationStats.js +32 -0
- package/cjs/domain/record/serialization/serializationStats.js.map +1 -0
- package/cjs/domain/record/serialization/serializationTransaction.d.ts +96 -0
- package/cjs/domain/record/serialization/serializationTransaction.js +103 -0
- package/cjs/domain/record/serialization/serializationTransaction.js.map +1 -0
- package/cjs/domain/record/serialization/serializationUtils.d.ts +18 -0
- package/cjs/domain/record/serialization/serializationUtils.js +88 -0
- package/cjs/domain/record/serialization/serializationUtils.js.map +1 -0
- package/cjs/domain/record/serialization/serializeAttribute.d.ts +4 -0
- package/cjs/domain/record/serialization/serializeAttribute.js +42 -0
- package/cjs/domain/record/serialization/serializeAttribute.js.map +1 -0
- package/cjs/domain/record/serialization/serializeAttributes.d.ts +7 -0
- package/cjs/domain/record/serialization/serializeAttributes.js +167 -0
- package/cjs/domain/record/serialization/serializeAttributes.js.map +1 -0
- package/cjs/domain/record/serialization/serializeFullSnapshot.d.ts +5 -0
- package/cjs/domain/record/serialization/serializeFullSnapshot.js +34 -0
- package/cjs/domain/record/serialization/serializeFullSnapshot.js.map +1 -0
- package/cjs/domain/record/serialization/serializeFullSnapshotAsChange.d.ts +5 -0
- package/cjs/domain/record/serialization/serializeFullSnapshotAsChange.js +13 -0
- package/cjs/domain/record/serialization/serializeFullSnapshotAsChange.js.map +1 -0
- package/cjs/domain/record/serialization/serializeMutations.d.ts +11 -0
- package/cjs/domain/record/serialization/serializeMutations.js +262 -0
- package/cjs/domain/record/serialization/serializeMutations.js.map +1 -0
- package/cjs/domain/record/serialization/serializeMutationsAsChange.d.ts +5 -0
- package/cjs/domain/record/serialization/serializeMutationsAsChange.js +204 -0
- package/cjs/domain/record/serialization/serializeMutationsAsChange.js.map +1 -0
- package/cjs/domain/record/serialization/serializeNode.d.ts +7 -0
- package/cjs/domain/record/serialization/serializeNode.js +154 -0
- package/cjs/domain/record/serialization/serializeNode.js.map +1 -0
- package/cjs/domain/record/serialization/serializeNodeAsChange.d.ts +4 -0
- package/cjs/domain/record/serialization/serializeNodeAsChange.js +153 -0
- package/cjs/domain/record/serialization/serializeNodeAsChange.js.map +1 -0
- package/cjs/domain/record/serialization/serializeStyleSheets.d.ts +3 -0
- package/cjs/domain/record/serialization/serializeStyleSheets.js +30 -0
- package/cjs/domain/record/serialization/serializeStyleSheets.js.map +1 -0
- package/cjs/domain/record/serializationVerifier.d.ts +18 -0
- package/cjs/domain/record/serializationVerifier.js +126 -0
- package/cjs/domain/record/serializationVerifier.js.map +1 -0
- package/cjs/domain/record/shadowRootsController.d.ts +11 -0
- package/cjs/domain/record/shadowRootsController.js +45 -0
- package/cjs/domain/record/shadowRootsController.js.map +1 -0
- package/cjs/domain/record/startFullSnapshots.d.ts +10 -0
- package/cjs/domain/record/startFullSnapshots.js +50 -0
- package/cjs/domain/record/startFullSnapshots.js.map +1 -0
- package/cjs/domain/record/trackers/index.d.ts +12 -0
- package/cjs/domain/record/trackers/index.js +27 -0
- package/cjs/domain/record/trackers/index.js.map +1 -0
- package/cjs/domain/record/trackers/trackFocus.d.ts +5 -0
- package/cjs/domain/record/trackers/trackFocus.js +15 -0
- package/cjs/domain/record/trackers/trackFocus.js.map +1 -0
- package/cjs/domain/record/trackers/trackFrustration.d.ts +6 -0
- package/cjs/domain/record/trackers/trackFrustration.js +31 -0
- package/cjs/domain/record/trackers/trackFrustration.js.map +1 -0
- package/cjs/domain/record/trackers/trackInput.d.ts +4 -0
- package/cjs/domain/record/trackers/trackInput.js +104 -0
- package/cjs/domain/record/trackers/trackInput.js.map +1 -0
- package/cjs/domain/record/trackers/trackMediaInteraction.d.ts +5 -0
- package/cjs/domain/record/trackers/trackMediaInteraction.js +29 -0
- package/cjs/domain/record/trackers/trackMediaInteraction.js.map +1 -0
- package/cjs/domain/record/trackers/trackMouseInteraction.d.ts +5 -0
- package/cjs/domain/record/trackers/trackMouseInteraction.js +59 -0
- package/cjs/domain/record/trackers/trackMouseInteraction.js.map +1 -0
- package/cjs/domain/record/trackers/trackMove.d.ts +9 -0
- package/cjs/domain/record/trackers/trackMove.js +55 -0
- package/cjs/domain/record/trackers/trackMove.js.map +1 -0
- package/cjs/domain/record/trackers/trackMutation.d.ts +13 -0
- package/cjs/domain/record/trackers/trackMutation.js +41 -0
- package/cjs/domain/record/trackers/trackMutation.js.map +1 -0
- package/cjs/domain/record/trackers/trackScroll.d.ts +5 -0
- package/cjs/domain/record/trackers/trackScroll.js +48 -0
- package/cjs/domain/record/trackers/trackScroll.js.map +1 -0
- package/cjs/domain/record/trackers/trackStyleSheet.d.ts +6 -0
- package/cjs/domain/record/trackers/trackStyleSheet.js +89 -0
- package/cjs/domain/record/trackers/trackStyleSheet.js.map +1 -0
- package/cjs/domain/record/trackers/trackViewEnd.d.ts +5 -0
- package/cjs/domain/record/trackers/trackViewEnd.js +20 -0
- package/cjs/domain/record/trackers/trackViewEnd.js.map +1 -0
- package/cjs/domain/record/trackers/trackViewportResize.d.ts +6 -0
- package/cjs/domain/record/trackers/trackViewportResize.js +46 -0
- package/cjs/domain/record/trackers/trackViewportResize.js.map +1 -0
- package/cjs/domain/record/trackers/tracker.types.d.ts +3 -0
- package/cjs/domain/record/trackers/tracker.types.js +3 -0
- package/cjs/domain/record/trackers/tracker.types.js.map +1 -0
- package/cjs/domain/record/viewports.d.ts +20 -0
- package/cjs/domain/record/viewports.js +60 -0
- package/cjs/domain/record/viewports.js.map +1 -0
- package/cjs/domain/replayStats.d.ts +8 -0
- package/cjs/domain/replayStats.js +60 -0
- package/cjs/domain/replayStats.js.map +1 -0
- package/cjs/domain/scriptLoadingError.d.ts +6 -0
- package/cjs/domain/scriptLoadingError.js +26 -0
- package/cjs/domain/scriptLoadingError.js.map +1 -0
- package/cjs/domain/segmentCollection/buildReplayPayload.d.ts +15 -0
- package/cjs/domain/segmentCollection/buildReplayPayload.js +26 -0
- package/cjs/domain/segmentCollection/buildReplayPayload.js.map +1 -0
- package/cjs/domain/segmentCollection/index.d.ts +4 -0
- package/cjs/domain/segmentCollection/index.js +11 -0
- package/cjs/domain/segmentCollection/index.js.map +1 -0
- package/cjs/domain/segmentCollection/segment.d.ts +16 -0
- package/cjs/domain/segmentCollection/segment.js +82 -0
- package/cjs/domain/segmentCollection/segment.js.map +1 -0
- package/cjs/domain/segmentCollection/segmentCollection.d.ts +31 -0
- package/cjs/domain/segmentCollection/segmentCollection.js +113 -0
- package/cjs/domain/segmentCollection/segmentCollection.js.map +1 -0
- package/cjs/domain/segmentCollection/startSegmentTelemetry.d.ts +6 -0
- package/cjs/domain/segmentCollection/startSegmentTelemetry.js +52 -0
- package/cjs/domain/segmentCollection/startSegmentTelemetry.js.map +1 -0
- package/cjs/domain/startRecordBridge.d.ts +5 -0
- package/cjs/domain/startRecordBridge.js +17 -0
- package/cjs/domain/startRecordBridge.js.map +1 -0
- package/cjs/domain/startRecorderInitTelemetry.d.ts +15 -0
- package/cjs/domain/startRecorderInitTelemetry.js +55 -0
- package/cjs/domain/startRecorderInitTelemetry.js.map +1 -0
- package/cjs/entries/internal.d.ts +11 -0
- package/cjs/entries/internal.js +28 -0
- package/cjs/entries/internal.js.map +1 -0
- package/cjs/entries/internalSynthetics.d.ts +2 -0
- package/cjs/entries/internalSynthetics.js +27 -0
- package/cjs/entries/internalSynthetics.js.map +1 -0
- package/cjs/entries/main.d.ts +23 -0
- package/cjs/entries/main.js +35 -0
- package/cjs/entries/main.js.map +1 -0
- package/cjs/types/index.d.ts +3 -0
- package/cjs/types/index.js +18 -0
- package/cjs/types/index.js.map +1 -0
- package/cjs/types/profiling.d.ts +296 -0
- package/cjs/types/profiling.js +6 -0
- package/cjs/types/profiling.js.map +1 -0
- package/cjs/types/sessionReplay.d.ts +934 -0
- package/cjs/types/sessionReplay.js +6 -0
- package/cjs/types/sessionReplay.js.map +1 -0
- package/cjs/types/sessionReplayConstants.d.ts +71 -0
- package/cjs/types/sessionReplayConstants.js +67 -0
- package/cjs/types/sessionReplayConstants.js.map +1 -0
- package/esm/boot/isBrowserSupported.d.ts +4 -0
- package/esm/boot/isBrowserSupported.js +14 -0
- package/esm/boot/isBrowserSupported.js.map +1 -0
- package/esm/boot/lazyLoadProfiler.d.ts +3 -0
- package/esm/boot/lazyLoadProfiler.js +19 -0
- package/esm/boot/lazyLoadProfiler.js.map +1 -0
- package/esm/boot/lazyLoadRecorder.d.ts +3 -0
- package/esm/boot/lazyLoadRecorder.js +19 -0
- package/esm/boot/lazyLoadRecorder.js.map +1 -0
- package/esm/boot/postStartStrategy.d.ts +33 -0
- package/esm/boot/postStartStrategy.js +95 -0
- package/esm/boot/postStartStrategy.js.map +1 -0
- package/esm/boot/preStartStrategy.d.ts +6 -0
- package/esm/boot/preStartStrategy.js +21 -0
- package/esm/boot/preStartStrategy.js.map +1 -0
- package/esm/boot/profilerApi.d.ts +2 -0
- package/esm/boot/profilerApi.js +49 -0
- package/esm/boot/profilerApi.js.map +1 -0
- package/esm/boot/recorderApi.d.ts +3 -0
- package/esm/boot/recorderApi.js +68 -0
- package/esm/boot/recorderApi.js.map +1 -0
- package/esm/boot/startRecording.d.ts +6 -0
- package/esm/boot/startRecording.js +42 -0
- package/esm/boot/startRecording.js.map +1 -0
- package/esm/domain/deflate/deflateEncoder.d.ts +3 -0
- package/esm/domain/deflate/deflateEncoder.js +107 -0
- package/esm/domain/deflate/deflateEncoder.js.map +1 -0
- package/esm/domain/deflate/deflateWorker.d.ts +29 -0
- package/esm/domain/deflate/deflateWorker.js +97 -0
- package/esm/domain/deflate/deflateWorker.js.map +1 -0
- package/esm/domain/deflate/index.d.ts +3 -0
- package/esm/domain/deflate/index.js +3 -0
- package/esm/domain/deflate/index.js.map +1 -0
- package/esm/domain/getSessionReplayLink.d.ts +2 -0
- package/esm/domain/getSessionReplayLink.js +32 -0
- package/esm/domain/getSessionReplayLink.js.map +1 -0
- package/esm/domain/profiling/actionHistory.d.ts +10 -0
- package/esm/domain/profiling/actionHistory.js +45 -0
- package/esm/domain/profiling/actionHistory.js.map +1 -0
- package/esm/domain/profiling/longTaskHistory.d.ts +11 -0
- package/esm/domain/profiling/longTaskHistory.js +24 -0
- package/esm/domain/profiling/longTaskHistory.js.map +1 -0
- package/esm/domain/profiling/profiler.d.ts +7 -0
- package/esm/domain/profiling/profiler.js +263 -0
- package/esm/domain/profiling/profiler.js.map +1 -0
- package/esm/domain/profiling/profilingContext.d.ts +6 -0
- package/esm/domain/profiling/profilingContext.js +28 -0
- package/esm/domain/profiling/profilingContext.js.map +1 -0
- package/esm/domain/profiling/profilingSupported.d.ts +1 -0
- package/esm/domain/profiling/profilingSupported.js +8 -0
- package/esm/domain/profiling/profilingSupported.js.map +1 -0
- package/esm/domain/profiling/test-utils/mockedTrace.d.ts +3 -0
- package/esm/domain/profiling/test-utils/mockedTrace.js +54 -0
- package/esm/domain/profiling/test-utils/mockedTrace.js.map +1 -0
- package/esm/domain/profiling/transport/assembly.d.ts +7 -0
- package/esm/domain/profiling/transport/assembly.js +42 -0
- package/esm/domain/profiling/transport/assembly.js.map +1 -0
- package/esm/domain/profiling/transport/buildProfileEventAttributes.d.ts +33 -0
- package/esm/domain/profiling/transport/buildProfileEventAttributes.js +60 -0
- package/esm/domain/profiling/transport/buildProfileEventAttributes.js.map +1 -0
- package/esm/domain/profiling/types/index.d.ts +2 -0
- package/esm/domain/profiling/types/index.js +2 -0
- package/esm/domain/profiling/types/index.js.map +1 -0
- package/esm/domain/profiling/types/profilerApi.types.d.ts +58 -0
- package/esm/domain/profiling/types/profilerApi.types.js +4 -0
- package/esm/domain/profiling/types/profilerApi.types.js.map +1 -0
- package/esm/domain/profiling/types/rumProfiler.types.d.ts +55 -0
- package/esm/domain/profiling/types/rumProfiler.types.js +2 -0
- package/esm/domain/profiling/types/rumProfiler.types.js.map +1 -0
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.d.ts +1 -0
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.js +3 -0
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.js.map +1 -0
- package/esm/domain/profiling/utils/getDefaultViewName.d.ts +1 -0
- package/esm/domain/profiling/utils/getDefaultViewName.js +11 -0
- package/esm/domain/profiling/utils/getDefaultViewName.js.map +1 -0
- package/esm/domain/profiling/utils/getNumberOfSamples.d.ts +8 -0
- package/esm/domain/profiling/utils/getNumberOfSamples.js +16 -0
- package/esm/domain/profiling/utils/getNumberOfSamples.js.map +1 -0
- package/esm/domain/profiling/vitalHistory.d.ts +10 -0
- package/esm/domain/profiling/vitalHistory.js +38 -0
- package/esm/domain/profiling/vitalHistory.js.map +1 -0
- package/esm/domain/record/assembly.d.ts +3 -0
- package/esm/domain/record/assembly.js +13 -0
- package/esm/domain/record/assembly.js.map +1 -0
- package/esm/domain/record/elementsScrollPositions.d.ts +10 -0
- package/esm/domain/record/elementsScrollPositions.js +20 -0
- package/esm/domain/record/elementsScrollPositions.js.map +1 -0
- package/esm/domain/record/eventsUtils.d.ts +2 -0
- package/esm/domain/record/eventsUtils.js +11 -0
- package/esm/domain/record/eventsUtils.js.map +1 -0
- package/esm/domain/record/index.d.ts +6 -0
- package/esm/domain/record/index.js +5 -0
- package/esm/domain/record/index.js.map +1 -0
- package/esm/domain/record/internalApi.d.ts +22 -0
- package/esm/domain/record/internalApi.js +51 -0
- package/esm/domain/record/internalApi.js.map +1 -0
- package/esm/domain/record/itemIds.d.ts +40 -0
- package/esm/domain/record/itemIds.js +52 -0
- package/esm/domain/record/itemIds.js.map +1 -0
- package/esm/domain/record/mutationBatch.d.ts +12 -0
- package/esm/domain/record/mutationBatch.js +40 -0
- package/esm/domain/record/mutationBatch.js.map +1 -0
- package/esm/domain/record/record.d.ts +16 -0
- package/esm/domain/record/record.js +52 -0
- package/esm/domain/record/record.js.map +1 -0
- package/esm/domain/record/record.types.d.ts +18 -0
- package/esm/domain/record/record.types.js +2 -0
- package/esm/domain/record/record.types.js.map +1 -0
- package/esm/domain/record/recordingScope.d.ts +24 -0
- package/esm/domain/record/recordingScope.js +26 -0
- package/esm/domain/record/recordingScope.js.map +1 -0
- package/esm/domain/record/serialization/changeEncoder.d.ts +22 -0
- package/esm/domain/record/serialization/changeEncoder.js +56 -0
- package/esm/domain/record/serialization/changeEncoder.js.map +1 -0
- package/esm/domain/record/serialization/conversions/changeConverter.d.ts +10 -0
- package/esm/domain/record/serialization/conversions/changeConverter.js +213 -0
- package/esm/domain/record/serialization/conversions/changeConverter.js.map +1 -0
- package/esm/domain/record/serialization/conversions/changeDecoder.d.ts +16 -0
- package/esm/domain/record/serialization/conversions/changeDecoder.js +134 -0
- package/esm/domain/record/serialization/conversions/changeDecoder.js.map +1 -0
- package/esm/domain/record/serialization/conversions/index.d.ts +7 -0
- package/esm/domain/record/serialization/conversions/index.js +4 -0
- package/esm/domain/record/serialization/conversions/index.js.map +1 -0
- package/esm/domain/record/serialization/conversions/mutationLog.d.ts +15 -0
- package/esm/domain/record/serialization/conversions/mutationLog.js +33 -0
- package/esm/domain/record/serialization/conversions/mutationLog.js.map +1 -0
- package/esm/domain/record/serialization/conversions/nodeIdRemapper.d.ts +10 -0
- package/esm/domain/record/serialization/conversions/nodeIdRemapper.js +49 -0
- package/esm/domain/record/serialization/conversions/nodeIdRemapper.js.map +1 -0
- package/esm/domain/record/serialization/conversions/renderOptions.d.ts +6 -0
- package/esm/domain/record/serialization/conversions/renderOptions.js +9 -0
- package/esm/domain/record/serialization/conversions/renderOptions.js.map +1 -0
- package/esm/domain/record/serialization/conversions/stringTable.d.ts +5 -0
- package/esm/domain/record/serialization/conversions/stringTable.js +19 -0
- package/esm/domain/record/serialization/conversions/stringTable.js.map +1 -0
- package/esm/domain/record/serialization/conversions/vDocument.d.ts +23 -0
- package/esm/domain/record/serialization/conversions/vDocument.js +173 -0
- package/esm/domain/record/serialization/conversions/vDocument.js.map +1 -0
- package/esm/domain/record/serialization/conversions/vNode.d.ts +66 -0
- package/esm/domain/record/serialization/conversions/vNode.js +282 -0
- package/esm/domain/record/serialization/conversions/vNode.js.map +1 -0
- package/esm/domain/record/serialization/conversions/vStyleSheet.d.ts +16 -0
- package/esm/domain/record/serialization/conversions/vStyleSheet.js +26 -0
- package/esm/domain/record/serialization/conversions/vStyleSheet.js.map +1 -0
- package/esm/domain/record/serialization/experimentalFeatures.d.ts +2 -0
- package/esm/domain/record/serialization/experimentalFeatures.js +12 -0
- package/esm/domain/record/serialization/experimentalFeatures.js.map +1 -0
- package/esm/domain/record/serialization/index.d.ts +17 -0
- package/esm/domain/record/serialization/index.js +14 -0
- package/esm/domain/record/serialization/index.js.map +1 -0
- package/esm/domain/record/serialization/insertionCursor.d.ts +57 -0
- package/esm/domain/record/serialization/insertionCursor.js +64 -0
- package/esm/domain/record/serialization/insertionCursor.js.map +1 -0
- package/esm/domain/record/serialization/serialization.types.d.ts +24 -0
- package/esm/domain/record/serialization/serialization.types.js +2 -0
- package/esm/domain/record/serialization/serialization.types.js.map +1 -0
- package/esm/domain/record/serialization/serializationStats.d.ts +12 -0
- package/esm/domain/record/serialization/serializationStats.js +27 -0
- package/esm/domain/record/serialization/serializationStats.js.map +1 -0
- package/esm/domain/record/serialization/serializationTransaction.d.ts +96 -0
- package/esm/domain/record/serialization/serializationTransaction.js +99 -0
- package/esm/domain/record/serialization/serializationTransaction.js.map +1 -0
- package/esm/domain/record/serialization/serializationUtils.d.ts +18 -0
- package/esm/domain/record/serialization/serializationUtils.js +80 -0
- package/esm/domain/record/serialization/serializationUtils.js.map +1 -0
- package/esm/domain/record/serialization/serializeAttribute.d.ts +4 -0
- package/esm/domain/record/serialization/serializeAttribute.js +38 -0
- package/esm/domain/record/serialization/serializeAttribute.js.map +1 -0
- package/esm/domain/record/serialization/serializeAttributes.d.ts +7 -0
- package/esm/domain/record/serialization/serializeAttributes.js +161 -0
- package/esm/domain/record/serialization/serializeAttributes.js.map +1 -0
- package/esm/domain/record/serialization/serializeFullSnapshot.d.ts +5 -0
- package/esm/domain/record/serialization/serializeFullSnapshot.js +31 -0
- package/esm/domain/record/serialization/serializeFullSnapshot.js.map +1 -0
- package/esm/domain/record/serialization/serializeFullSnapshotAsChange.d.ts +5 -0
- package/esm/domain/record/serialization/serializeFullSnapshotAsChange.js +10 -0
- package/esm/domain/record/serialization/serializeFullSnapshotAsChange.js.map +1 -0
- package/esm/domain/record/serialization/serializeMutations.d.ts +11 -0
- package/esm/domain/record/serialization/serializeMutations.js +257 -0
- package/esm/domain/record/serialization/serializeMutations.js.map +1 -0
- package/esm/domain/record/serialization/serializeMutationsAsChange.d.ts +5 -0
- package/esm/domain/record/serialization/serializeMutationsAsChange.js +201 -0
- package/esm/domain/record/serialization/serializeMutationsAsChange.js.map +1 -0
- package/esm/domain/record/serialization/serializeNode.d.ts +7 -0
- package/esm/domain/record/serialization/serializeNode.js +149 -0
- package/esm/domain/record/serialization/serializeNode.js.map +1 -0
- package/esm/domain/record/serialization/serializeNodeAsChange.d.ts +4 -0
- package/esm/domain/record/serialization/serializeNodeAsChange.js +150 -0
- package/esm/domain/record/serialization/serializeNodeAsChange.js.map +1 -0
- package/esm/domain/record/serialization/serializeStyleSheets.d.ts +3 -0
- package/esm/domain/record/serialization/serializeStyleSheets.js +27 -0
- package/esm/domain/record/serialization/serializeStyleSheets.js.map +1 -0
- package/esm/domain/record/serializationVerifier.d.ts +18 -0
- package/esm/domain/record/serializationVerifier.js +123 -0
- package/esm/domain/record/serializationVerifier.js.map +1 -0
- package/esm/domain/record/shadowRootsController.d.ts +11 -0
- package/esm/domain/record/shadowRootsController.js +41 -0
- package/esm/domain/record/shadowRootsController.js.map +1 -0
- package/esm/domain/record/startFullSnapshots.d.ts +10 -0
- package/esm/domain/record/startFullSnapshots.js +46 -0
- package/esm/domain/record/startFullSnapshots.js.map +1 -0
- package/esm/domain/record/trackers/index.d.ts +12 -0
- package/esm/domain/record/trackers/index.js +12 -0
- package/esm/domain/record/trackers/index.js.map +1 -0
- package/esm/domain/record/trackers/trackFocus.d.ts +5 -0
- package/esm/domain/record/trackers/trackFocus.js +12 -0
- package/esm/domain/record/trackers/trackFocus.js.map +1 -0
- package/esm/domain/record/trackers/trackFrustration.d.ts +6 -0
- package/esm/domain/record/trackers/trackFrustration.js +28 -0
- package/esm/domain/record/trackers/trackFrustration.js.map +1 -0
- package/esm/domain/record/trackers/trackInput.d.ts +4 -0
- package/esm/domain/record/trackers/trackInput.js +101 -0
- package/esm/domain/record/trackers/trackInput.js.map +1 -0
- package/esm/domain/record/trackers/trackMediaInteraction.d.ts +5 -0
- package/esm/domain/record/trackers/trackMediaInteraction.js +26 -0
- package/esm/domain/record/trackers/trackMediaInteraction.js.map +1 -0
- package/esm/domain/record/trackers/trackMouseInteraction.d.ts +5 -0
- package/esm/domain/record/trackers/trackMouseInteraction.js +56 -0
- package/esm/domain/record/trackers/trackMouseInteraction.js.map +1 -0
- package/esm/domain/record/trackers/trackMove.d.ts +9 -0
- package/esm/domain/record/trackers/trackMove.js +51 -0
- package/esm/domain/record/trackers/trackMove.js.map +1 -0
- package/esm/domain/record/trackers/trackMutation.d.ts +13 -0
- package/esm/domain/record/trackers/trackMutation.js +38 -0
- package/esm/domain/record/trackers/trackMutation.js.map +1 -0
- package/esm/domain/record/trackers/trackScroll.d.ts +5 -0
- package/esm/domain/record/trackers/trackScroll.js +45 -0
- package/esm/domain/record/trackers/trackScroll.js.map +1 -0
- package/esm/domain/record/trackers/trackStyleSheet.d.ts +6 -0
- package/esm/domain/record/trackers/trackStyleSheet.js +85 -0
- package/esm/domain/record/trackers/trackStyleSheet.js.map +1 -0
- package/esm/domain/record/trackers/trackViewEnd.d.ts +5 -0
- package/esm/domain/record/trackers/trackViewEnd.js +17 -0
- package/esm/domain/record/trackers/trackViewEnd.js.map +1 -0
- package/esm/domain/record/trackers/trackViewportResize.d.ts +6 -0
- package/esm/domain/record/trackers/trackViewportResize.js +42 -0
- package/esm/domain/record/trackers/trackViewportResize.js.map +1 -0
- package/esm/domain/record/trackers/tracker.types.d.ts +3 -0
- package/esm/domain/record/trackers/tracker.types.js +2 -0
- package/esm/domain/record/trackers/tracker.types.js.map +1 -0
- package/esm/domain/record/viewports.d.ts +20 -0
- package/esm/domain/record/viewports.js +55 -0
- package/esm/domain/record/viewports.js.map +1 -0
- package/esm/domain/replayStats.d.ts +8 -0
- package/esm/domain/replayStats.js +51 -0
- package/esm/domain/replayStats.js.map +1 -0
- package/esm/domain/scriptLoadingError.d.ts +6 -0
- package/esm/domain/scriptLoadingError.js +23 -0
- package/esm/domain/scriptLoadingError.js.map +1 -0
- package/esm/domain/segmentCollection/buildReplayPayload.d.ts +15 -0
- package/esm/domain/segmentCollection/buildReplayPayload.js +23 -0
- package/esm/domain/segmentCollection/buildReplayPayload.js.map +1 -0
- package/esm/domain/segmentCollection/index.d.ts +4 -0
- package/esm/domain/segmentCollection/index.js +4 -0
- package/esm/domain/segmentCollection/index.js.map +1 -0
- package/esm/domain/segmentCollection/segment.d.ts +16 -0
- package/esm/domain/segmentCollection/segment.js +46 -0
- package/esm/domain/segmentCollection/segment.js.map +1 -0
- package/esm/domain/segmentCollection/segmentCollection.d.ts +31 -0
- package/esm/domain/segmentCollection/segmentCollection.js +106 -0
- package/esm/domain/segmentCollection/segmentCollection.js.map +1 -0
- package/esm/domain/segmentCollection/startSegmentTelemetry.d.ts +6 -0
- package/esm/domain/segmentCollection/startSegmentTelemetry.js +49 -0
- package/esm/domain/segmentCollection/startSegmentTelemetry.js.map +1 -0
- package/esm/domain/startRecordBridge.d.ts +5 -0
- package/esm/domain/startRecordBridge.js +14 -0
- package/esm/domain/startRecordBridge.js.map +1 -0
- package/esm/domain/startRecorderInitTelemetry.d.ts +15 -0
- package/esm/domain/startRecorderInitTelemetry.js +52 -0
- package/esm/domain/startRecorderInitTelemetry.js.map +1 -0
- package/esm/entries/internal.d.ts +11 -0
- package/esm/entries/internal.js +4 -0
- package/esm/entries/internal.js.map +1 -0
- package/esm/entries/internalSynthetics.d.ts +2 -0
- package/esm/entries/internalSynthetics.js +23 -0
- package/esm/entries/internalSynthetics.js.map +1 -0
- package/esm/entries/main.d.ts +23 -0
- package/esm/entries/main.js +31 -0
- package/esm/entries/main.js.map +1 -0
- package/esm/types/index.d.ts +3 -0
- package/esm/types/index.js +2 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/profiling.d.ts +296 -0
- package/esm/types/profiling.js +5 -0
- package/esm/types/profiling.js.map +1 -0
- package/esm/types/sessionReplay.d.ts +934 -0
- package/esm/types/sessionReplay.js +5 -0
- package/esm/types/sessionReplay.js.map +1 -0
- package/esm/types/sessionReplayConstants.d.ts +71 -0
- package/esm/types/sessionReplayConstants.js +64 -0
- package/esm/types/sessionReplayConstants.js.map +1 -0
- package/internal/package.json +6 -0
- package/internal-synthetics/package.json +6 -0
- package/package.json +52 -0
- package/src/boot/isBrowserSupported.ts +14 -0
- package/src/boot/lazyLoadProfiler.ts +20 -0
- package/src/boot/lazyLoadRecorder.ts +20 -0
- package/src/boot/postStartStrategy.ts +176 -0
- package/src/boot/preStartStrategy.ts +34 -0
- package/src/boot/profilerApi.ts +82 -0
- package/src/boot/recorderApi.ts +113 -0
- package/src/boot/startRecording.ts +70 -0
- package/src/domain/deflate/deflateEncoder.ts +144 -0
- package/src/domain/deflate/deflateWorker.ts +152 -0
- package/src/domain/deflate/index.ts +9 -0
- package/src/domain/getSessionReplayLink.ts +40 -0
- package/src/domain/profiling/actionHistory.ts +65 -0
- package/src/domain/profiling/longTaskHistory.ts +40 -0
- package/src/domain/profiling/profiler.ts +366 -0
- package/src/domain/profiling/profilingContext.ts +39 -0
- package/src/domain/profiling/profilingSupported.ts +10 -0
- package/src/domain/profiling/test-utils/mockedTrace.ts +58 -0
- package/src/domain/profiling/transport/assembly.ts +63 -0
- package/src/domain/profiling/transport/buildProfileEventAttributes.ts +106 -0
- package/src/domain/profiling/types/index.ts +2 -0
- package/src/domain/profiling/types/profilerApi.types.ts +87 -0
- package/src/domain/profiling/types/rumProfiler.types.ts +62 -0
- package/src/domain/profiling/utils/getCustomOrDefaultViewName.ts +4 -0
- package/src/domain/profiling/utils/getDefaultViewName.ts +12 -0
- package/src/domain/profiling/utils/getNumberOfSamples.ts +17 -0
- package/src/domain/profiling/vitalHistory.ts +58 -0
- package/src/domain/record/assembly.ts +19 -0
- package/src/domain/record/elementsScrollPositions.ts +28 -0
- package/src/domain/record/eventsUtils.ts +12 -0
- package/src/domain/record/index.ts +12 -0
- package/src/domain/record/internalApi.ts +84 -0
- package/src/domain/record/itemIds.ts +97 -0
- package/src/domain/record/mutationBatch.ts +47 -0
- package/src/domain/record/record.ts +90 -0
- package/src/domain/record/record.types.ts +22 -0
- package/src/domain/record/recordingScope.ts +58 -0
- package/src/domain/record/serialization/changeEncoder.ts +89 -0
- package/src/domain/record/serialization/conversions/changeConverter.ts +277 -0
- package/src/domain/record/serialization/conversions/changeDecoder.ts +192 -0
- package/src/domain/record/serialization/conversions/index.ts +7 -0
- package/src/domain/record/serialization/conversions/mutationLog.ts +56 -0
- package/src/domain/record/serialization/conversions/nodeIdRemapper.ts +69 -0
- package/src/domain/record/serialization/conversions/renderOptions.ts +14 -0
- package/src/domain/record/serialization/conversions/stringTable.ts +25 -0
- package/src/domain/record/serialization/conversions/vDocument.ts +239 -0
- package/src/domain/record/serialization/conversions/vNode.ts +417 -0
- package/src/domain/record/serialization/conversions/vStyleSheet.ts +47 -0
- package/src/domain/record/serialization/experimentalFeatures.ts +15 -0
- package/src/domain/record/serialization/index.ts +21 -0
- package/src/domain/record/serialization/insertionCursor.ts +131 -0
- package/src/domain/record/serialization/serialization.types.ts +38 -0
- package/src/domain/record/serialization/serializationStats.ts +43 -0
- package/src/domain/record/serialization/serializationTransaction.ts +255 -0
- package/src/domain/record/serialization/serializationUtils.ts +103 -0
- package/src/domain/record/serialization/serializeAttribute.ts +55 -0
- package/src/domain/record/serialization/serializeAttributes.ts +194 -0
- package/src/domain/record/serialization/serializeFullSnapshot.ts +46 -0
- package/src/domain/record/serialization/serializeFullSnapshotAsChange.ts +33 -0
- package/src/domain/record/serialization/serializeMutations.ts +395 -0
- package/src/domain/record/serialization/serializeMutationsAsChange.ts +298 -0
- package/src/domain/record/serialization/serializeNode.ts +229 -0
- package/src/domain/record/serialization/serializeNodeAsChange.ts +237 -0
- package/src/domain/record/serialization/serializeStyleSheets.ts +36 -0
- package/src/domain/record/serializationVerifier.ts +208 -0
- package/src/domain/record/shadowRootsController.ts +62 -0
- package/src/domain/record/startFullSnapshots.ts +92 -0
- package/src/domain/record/trackers/index.ts +12 -0
- package/src/domain/record/trackers/trackFocus.ts +16 -0
- package/src/domain/record/trackers/trackFrustration.ts +39 -0
- package/src/domain/record/trackers/trackInput.ts +128 -0
- package/src/domain/record/trackers/trackMediaInteraction.ts +43 -0
- package/src/domain/record/trackers/trackMouseInteraction.ts +74 -0
- package/src/domain/record/trackers/trackMove.ts +78 -0
- package/src/domain/record/trackers/trackMutation.ts +74 -0
- package/src/domain/record/trackers/trackScroll.ts +61 -0
- package/src/domain/record/trackers/trackStyleSheet.ts +117 -0
- package/src/domain/record/trackers/trackViewEnd.ts +27 -0
- package/src/domain/record/trackers/trackViewportResize.ts +69 -0
- package/src/domain/record/trackers/tracker.types.ts +3 -0
- package/src/domain/record/viewports.ts +68 -0
- package/src/domain/replayStats.ts +61 -0
- package/src/domain/scriptLoadingError.ts +36 -0
- package/src/domain/segmentCollection/buildReplayPayload.ts +52 -0
- package/src/domain/segmentCollection/index.ts +4 -0
- package/src/domain/segmentCollection/segment.ts +79 -0
- package/src/domain/segmentCollection/segmentCollection.ts +200 -0
- package/src/domain/segmentCollection/startSegmentTelemetry.ts +91 -0
- package/src/domain/startRecordBridge.ts +17 -0
- package/src/domain/startRecorderInitTelemetry.ts +90 -0
- package/src/entries/internal.ts +18 -0
- package/src/entries/internalSynthetics.ts +24 -0
- package/src/entries/main.ts +96 -0
- package/src/types/index.ts +3 -0
- package/src/types/profiling.ts +298 -0
- package/src/types/sessionReplay.ts +990 -0
- package/src/types/sessionReplayConstants.ts +130 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TimeStamp } from '@datadog/browser-core'
|
|
2
|
+
import type { EmitRecordCallback, EmitStatsCallback } from '../record.types'
|
|
3
|
+
import type { RecordingScope } from '../recordingScope'
|
|
4
|
+
import { serializeChangesInTransaction } from './serializationTransaction'
|
|
5
|
+
import type { ChangeSerializationTransaction, SerializationKind } from './serializationTransaction'
|
|
6
|
+
import { serializeNodeAsChange } from './serializeNodeAsChange'
|
|
7
|
+
import { createRootInsertionCursor } from './insertionCursor'
|
|
8
|
+
|
|
9
|
+
export function serializeFullSnapshotAsChange(
|
|
10
|
+
timestamp: TimeStamp,
|
|
11
|
+
kind: SerializationKind,
|
|
12
|
+
document: Document,
|
|
13
|
+
emitRecord: EmitRecordCallback,
|
|
14
|
+
emitStats: EmitStatsCallback,
|
|
15
|
+
scope: RecordingScope
|
|
16
|
+
): void {
|
|
17
|
+
scope.resetIds()
|
|
18
|
+
serializeChangesInTransaction(
|
|
19
|
+
kind,
|
|
20
|
+
emitRecord,
|
|
21
|
+
emitStats,
|
|
22
|
+
scope,
|
|
23
|
+
timestamp,
|
|
24
|
+
(transaction: ChangeSerializationTransaction) => {
|
|
25
|
+
serializeNodeAsChange(
|
|
26
|
+
createRootInsertionCursor(scope.nodeIds),
|
|
27
|
+
document,
|
|
28
|
+
scope.configuration.defaultPrivacyLevel,
|
|
29
|
+
transaction
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
NodePrivacyLevelCache,
|
|
3
|
+
RumMutationRecord,
|
|
4
|
+
RumChildListMutationRecord,
|
|
5
|
+
RumCharacterDataMutationRecord,
|
|
6
|
+
RumAttributesMutationRecord,
|
|
7
|
+
} from '@datadog/browser-rum-core'
|
|
8
|
+
import {
|
|
9
|
+
isNodeShadowHost,
|
|
10
|
+
getParentNode,
|
|
11
|
+
forEachChildNodes,
|
|
12
|
+
getNodePrivacyLevel,
|
|
13
|
+
getTextContent,
|
|
14
|
+
NodePrivacyLevel,
|
|
15
|
+
isNodeShadowRoot,
|
|
16
|
+
} from '@datadog/browser-rum-core'
|
|
17
|
+
import type { TimeStamp } from '@datadog/browser-core'
|
|
18
|
+
import { IncrementalSource } from '../../../types'
|
|
19
|
+
import type {
|
|
20
|
+
BrowserMutationData,
|
|
21
|
+
AddedNodeMutation,
|
|
22
|
+
AttributeMutation,
|
|
23
|
+
RemovedNodeMutation,
|
|
24
|
+
TextMutation,
|
|
25
|
+
} from '../../../types'
|
|
26
|
+
import type { RecordingScope } from '../recordingScope'
|
|
27
|
+
import type { RemoveShadowRootCallBack } from '../shadowRootsController'
|
|
28
|
+
import { assembleIncrementalSnapshot } from '../assembly'
|
|
29
|
+
import type { EmitRecordCallback, EmitStatsCallback } from '../record.types'
|
|
30
|
+
import type { NodeId, NodeIds } from '../itemIds'
|
|
31
|
+
import type { SerializationTransaction } from './serializationTransaction'
|
|
32
|
+
import { SerializationKind, serializeInTransaction } from './serializationTransaction'
|
|
33
|
+
import { serializeNode } from './serializeNode'
|
|
34
|
+
import { serializeAttribute } from './serializeAttribute'
|
|
35
|
+
import { getElementInputValue } from './serializationUtils'
|
|
36
|
+
|
|
37
|
+
export type NodeWithSerializedNode = Node & { __brand: 'NodeWithSerializedNode' }
|
|
38
|
+
type WithSerializedTarget<T> = T & { target: NodeWithSerializedNode }
|
|
39
|
+
|
|
40
|
+
export function serializeMutations(
|
|
41
|
+
timestamp: TimeStamp,
|
|
42
|
+
mutations: RumMutationRecord[],
|
|
43
|
+
emitRecord: EmitRecordCallback,
|
|
44
|
+
emitStats: EmitStatsCallback,
|
|
45
|
+
scope: RecordingScope
|
|
46
|
+
): void {
|
|
47
|
+
serializeInTransaction(
|
|
48
|
+
SerializationKind.INCREMENTAL_SNAPSHOT,
|
|
49
|
+
emitRecord,
|
|
50
|
+
emitStats,
|
|
51
|
+
scope,
|
|
52
|
+
(transaction: SerializationTransaction) => processMutations(timestamp, mutations, transaction)
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function processMutations(
|
|
57
|
+
timestamp: TimeStamp,
|
|
58
|
+
mutations: RumMutationRecord[],
|
|
59
|
+
transaction: SerializationTransaction
|
|
60
|
+
): void {
|
|
61
|
+
const nodePrivacyLevelCache: NodePrivacyLevelCache = new Map()
|
|
62
|
+
|
|
63
|
+
mutations
|
|
64
|
+
.filter((mutation): mutation is RumChildListMutationRecord => mutation.type === 'childList')
|
|
65
|
+
.forEach((mutation) => {
|
|
66
|
+
mutation.removedNodes.forEach((removedNode) => {
|
|
67
|
+
traverseRemovedShadowDom(removedNode, transaction.scope.shadowRootsController.removeShadowRoot)
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
// Discard any mutation with a 'target' node that:
|
|
72
|
+
// * isn't injected in the current document or isn't known/serialized yet: those nodes are likely
|
|
73
|
+
// part of a mutation occurring in a parent Node
|
|
74
|
+
// * should be hidden or ignored
|
|
75
|
+
const filteredMutations = mutations.filter(
|
|
76
|
+
(mutation): mutation is WithSerializedTarget<RumMutationRecord> =>
|
|
77
|
+
mutation.target.isConnected &&
|
|
78
|
+
idsAreAssignedForNodeAndAncestors(mutation.target, transaction.scope.nodeIds) &&
|
|
79
|
+
getNodePrivacyLevel(
|
|
80
|
+
mutation.target,
|
|
81
|
+
transaction.scope.configuration.defaultPrivacyLevel,
|
|
82
|
+
nodePrivacyLevelCache
|
|
83
|
+
) !== NodePrivacyLevel.HIDDEN
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
const { adds, removes, hasBeenSerialized } = processChildListMutations(
|
|
87
|
+
filteredMutations.filter(
|
|
88
|
+
(mutation): mutation is WithSerializedTarget<RumChildListMutationRecord> => mutation.type === 'childList'
|
|
89
|
+
),
|
|
90
|
+
nodePrivacyLevelCache,
|
|
91
|
+
transaction
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
const texts = processCharacterDataMutations(
|
|
95
|
+
filteredMutations.filter(
|
|
96
|
+
(mutation): mutation is WithSerializedTarget<RumCharacterDataMutationRecord> =>
|
|
97
|
+
mutation.type === 'characterData' && !hasBeenSerialized(mutation.target)
|
|
98
|
+
),
|
|
99
|
+
nodePrivacyLevelCache,
|
|
100
|
+
transaction
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
const attributes = processAttributesMutations(
|
|
104
|
+
filteredMutations.filter(
|
|
105
|
+
(mutation): mutation is WithSerializedTarget<RumAttributesMutationRecord> =>
|
|
106
|
+
mutation.type === 'attributes' && !hasBeenSerialized(mutation.target)
|
|
107
|
+
),
|
|
108
|
+
nodePrivacyLevelCache,
|
|
109
|
+
transaction
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
if (!texts.length && !attributes.length && !removes.length && !adds.length) {
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const record = assembleIncrementalSnapshot<BrowserMutationData>(
|
|
117
|
+
IncrementalSource.Mutation,
|
|
118
|
+
{
|
|
119
|
+
adds,
|
|
120
|
+
removes,
|
|
121
|
+
texts,
|
|
122
|
+
attributes,
|
|
123
|
+
},
|
|
124
|
+
timestamp
|
|
125
|
+
)
|
|
126
|
+
transaction.add(record)
|
|
127
|
+
|
|
128
|
+
transaction.scope.serializeObservable.notify({
|
|
129
|
+
type: 'incremental',
|
|
130
|
+
target: mutations,
|
|
131
|
+
timestamp,
|
|
132
|
+
v1: record,
|
|
133
|
+
})
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function processChildListMutations(
|
|
137
|
+
mutations: Array<WithSerializedTarget<RumChildListMutationRecord>>,
|
|
138
|
+
nodePrivacyLevelCache: NodePrivacyLevelCache,
|
|
139
|
+
transaction: SerializationTransaction
|
|
140
|
+
) {
|
|
141
|
+
// First, we iterate over mutations to collect:
|
|
142
|
+
//
|
|
143
|
+
// * nodes that have been added in the document and not removed by a subsequent mutation
|
|
144
|
+
// * nodes that have been removed from the document but were not added in a previous mutation
|
|
145
|
+
//
|
|
146
|
+
// For this second category, we also collect their previous parent (mutation.target) because we'll
|
|
147
|
+
// need it to emit a 'remove' mutation.
|
|
148
|
+
//
|
|
149
|
+
// Those two categories may overlap: if a node moved from a position to another, it is reported as
|
|
150
|
+
// two mutation records, one with a "removedNodes" and the other with "addedNodes". In this case,
|
|
151
|
+
// the node will be in both sets.
|
|
152
|
+
const addedAndMovedNodes = new Set<Node>()
|
|
153
|
+
const removedNodes = new Map<Node, NodeWithSerializedNode>()
|
|
154
|
+
for (const mutation of mutations) {
|
|
155
|
+
mutation.addedNodes.forEach((node) => {
|
|
156
|
+
addedAndMovedNodes.add(node)
|
|
157
|
+
})
|
|
158
|
+
mutation.removedNodes.forEach((node) => {
|
|
159
|
+
if (!addedAndMovedNodes.has(node)) {
|
|
160
|
+
removedNodes.set(node, mutation.target)
|
|
161
|
+
}
|
|
162
|
+
addedAndMovedNodes.delete(node)
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Then, we sort nodes that are still in the document by topological order, for two reasons:
|
|
167
|
+
//
|
|
168
|
+
// * We will serialize each added nodes with their descendants. We don't want to serialize a node
|
|
169
|
+
// twice, so we need to iterate over the parent nodes first and skip any node that is contained in
|
|
170
|
+
// a precedent node.
|
|
171
|
+
//
|
|
172
|
+
// * To emit "add" mutations, we need references to the parent and potential next sibling of each
|
|
173
|
+
// added node. So we need to iterate over the parent nodes first, and when multiple nodes are
|
|
174
|
+
// siblings, we want to iterate from last to first. This will ensure that any "next" node is
|
|
175
|
+
// already serialized and have an id.
|
|
176
|
+
const sortedAddedAndMovedNodes = Array.from(addedAndMovedNodes)
|
|
177
|
+
sortAddedAndMovedNodes(sortedAddedAndMovedNodes)
|
|
178
|
+
|
|
179
|
+
// Then, we iterate over our sorted node sets to emit mutations. We collect the newly serialized
|
|
180
|
+
// node ids in a set to be able to skip subsequent related mutations.
|
|
181
|
+
transaction.serializedNodeIds = new Set<NodeId>()
|
|
182
|
+
|
|
183
|
+
const addedNodeMutations: AddedNodeMutation[] = []
|
|
184
|
+
for (const node of sortedAddedAndMovedNodes) {
|
|
185
|
+
if (hasBeenSerialized(node)) {
|
|
186
|
+
continue
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const parentNodePrivacyLevel = getNodePrivacyLevel(
|
|
190
|
+
node.parentNode!,
|
|
191
|
+
transaction.scope.configuration.defaultPrivacyLevel,
|
|
192
|
+
nodePrivacyLevelCache
|
|
193
|
+
)
|
|
194
|
+
if (parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN || parentNodePrivacyLevel === NodePrivacyLevel.IGNORE) {
|
|
195
|
+
continue
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const serializedNode = serializeNode(node, parentNodePrivacyLevel, transaction)
|
|
199
|
+
if (!serializedNode) {
|
|
200
|
+
continue
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const parentNode = getParentNode(node)!
|
|
204
|
+
addedNodeMutations.push({
|
|
205
|
+
nextId: getNextSibling(node),
|
|
206
|
+
parentId: transaction.scope.nodeIds.get(parentNode)!,
|
|
207
|
+
node: serializedNode,
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
// Finally, we emit remove mutations.
|
|
211
|
+
const removedNodeMutations: RemovedNodeMutation[] = []
|
|
212
|
+
removedNodes.forEach((parent, node) => {
|
|
213
|
+
const parentId = transaction.scope.nodeIds.get(parent)
|
|
214
|
+
const id = transaction.scope.nodeIds.get(node)
|
|
215
|
+
if (parentId !== undefined && id !== undefined) {
|
|
216
|
+
removedNodeMutations.push({ parentId, id })
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
return { adds: addedNodeMutations, removes: removedNodeMutations, hasBeenSerialized }
|
|
221
|
+
|
|
222
|
+
function hasBeenSerialized(node: Node) {
|
|
223
|
+
const id = transaction.scope.nodeIds.get(node)
|
|
224
|
+
return id !== undefined && transaction.serializedNodeIds?.has(id)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function getNextSibling(node: Node): null | number {
|
|
228
|
+
let nextSibling = node.nextSibling
|
|
229
|
+
while (nextSibling) {
|
|
230
|
+
const id = transaction.scope.nodeIds.get(nextSibling)
|
|
231
|
+
if (id !== undefined) {
|
|
232
|
+
return id
|
|
233
|
+
}
|
|
234
|
+
nextSibling = nextSibling.nextSibling
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return null
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function processCharacterDataMutations(
|
|
242
|
+
mutations: Array<WithSerializedTarget<RumCharacterDataMutationRecord>>,
|
|
243
|
+
nodePrivacyLevelCache: NodePrivacyLevelCache,
|
|
244
|
+
transaction: SerializationTransaction
|
|
245
|
+
) {
|
|
246
|
+
const textMutations: TextMutation[] = []
|
|
247
|
+
|
|
248
|
+
// Deduplicate mutations based on their target node
|
|
249
|
+
const handledNodes = new Set<Node>()
|
|
250
|
+
const filteredMutations = mutations.filter((mutation) => {
|
|
251
|
+
if (handledNodes.has(mutation.target)) {
|
|
252
|
+
return false
|
|
253
|
+
}
|
|
254
|
+
handledNodes.add(mutation.target)
|
|
255
|
+
return true
|
|
256
|
+
})
|
|
257
|
+
|
|
258
|
+
// Emit mutations
|
|
259
|
+
for (const mutation of filteredMutations) {
|
|
260
|
+
const value = mutation.target.textContent
|
|
261
|
+
if (value === mutation.oldValue) {
|
|
262
|
+
continue
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const id = transaction.scope.nodeIds.get(mutation.target)
|
|
266
|
+
if (id === undefined) {
|
|
267
|
+
continue
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const parentNodePrivacyLevel = getNodePrivacyLevel(
|
|
271
|
+
getParentNode(mutation.target)!,
|
|
272
|
+
transaction.scope.configuration.defaultPrivacyLevel,
|
|
273
|
+
nodePrivacyLevelCache
|
|
274
|
+
)
|
|
275
|
+
if (parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN || parentNodePrivacyLevel === NodePrivacyLevel.IGNORE) {
|
|
276
|
+
continue
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
textMutations.push({
|
|
280
|
+
id,
|
|
281
|
+
value: getTextContent(mutation.target, parentNodePrivacyLevel) ?? null,
|
|
282
|
+
})
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
return textMutations
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function processAttributesMutations(
|
|
289
|
+
mutations: Array<WithSerializedTarget<RumAttributesMutationRecord>>,
|
|
290
|
+
nodePrivacyLevelCache: NodePrivacyLevelCache,
|
|
291
|
+
transaction: SerializationTransaction
|
|
292
|
+
) {
|
|
293
|
+
const attributeMutations: AttributeMutation[] = []
|
|
294
|
+
|
|
295
|
+
// Deduplicate mutations based on their target node and changed attribute
|
|
296
|
+
const handledElements = new Map<Element, Set<string>>()
|
|
297
|
+
const filteredMutations = mutations.filter((mutation) => {
|
|
298
|
+
const handledAttributes = handledElements.get(mutation.target)
|
|
299
|
+
if (handledAttributes && handledAttributes.has(mutation.attributeName!)) {
|
|
300
|
+
return false
|
|
301
|
+
}
|
|
302
|
+
if (!handledAttributes) {
|
|
303
|
+
handledElements.set(mutation.target, new Set([mutation.attributeName!]))
|
|
304
|
+
} else {
|
|
305
|
+
handledAttributes.add(mutation.attributeName!)
|
|
306
|
+
}
|
|
307
|
+
return true
|
|
308
|
+
})
|
|
309
|
+
|
|
310
|
+
// Emit mutations
|
|
311
|
+
const emittedMutations = new Map<Element, AttributeMutation>()
|
|
312
|
+
for (const mutation of filteredMutations) {
|
|
313
|
+
const uncensoredValue = mutation.target.getAttribute(mutation.attributeName!)
|
|
314
|
+
if (uncensoredValue === mutation.oldValue) {
|
|
315
|
+
continue
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const id = transaction.scope.nodeIds.get(mutation.target)
|
|
319
|
+
if (id === undefined) {
|
|
320
|
+
continue
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const privacyLevel = getNodePrivacyLevel(
|
|
324
|
+
mutation.target,
|
|
325
|
+
transaction.scope.configuration.defaultPrivacyLevel,
|
|
326
|
+
nodePrivacyLevelCache
|
|
327
|
+
)
|
|
328
|
+
const attributeValue = serializeAttribute(
|
|
329
|
+
mutation.target,
|
|
330
|
+
privacyLevel,
|
|
331
|
+
mutation.attributeName!,
|
|
332
|
+
transaction.scope.configuration
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
let transformedValue: string | null
|
|
336
|
+
if (mutation.attributeName === 'value') {
|
|
337
|
+
const inputValue = getElementInputValue(mutation.target, privacyLevel)
|
|
338
|
+
if (inputValue === undefined) {
|
|
339
|
+
continue
|
|
340
|
+
}
|
|
341
|
+
transformedValue = inputValue
|
|
342
|
+
} else if (typeof attributeValue === 'string') {
|
|
343
|
+
transformedValue = attributeValue
|
|
344
|
+
} else {
|
|
345
|
+
transformedValue = null
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
let emittedMutation = emittedMutations.get(mutation.target)
|
|
349
|
+
if (!emittedMutation) {
|
|
350
|
+
emittedMutation = { id, attributes: {} }
|
|
351
|
+
attributeMutations.push(emittedMutation)
|
|
352
|
+
emittedMutations.set(mutation.target, emittedMutation)
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
emittedMutation.attributes[mutation.attributeName!] = transformedValue
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
return attributeMutations
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export function sortAddedAndMovedNodes(nodes: Node[]) {
|
|
362
|
+
nodes.sort((a, b) => {
|
|
363
|
+
const position = a.compareDocumentPosition(b)
|
|
364
|
+
/* eslint-disable no-bitwise */
|
|
365
|
+
if (position & Node.DOCUMENT_POSITION_CONTAINED_BY) {
|
|
366
|
+
return -1
|
|
367
|
+
} else if (position & Node.DOCUMENT_POSITION_CONTAINS) {
|
|
368
|
+
return 1
|
|
369
|
+
} else if (position & Node.DOCUMENT_POSITION_FOLLOWING) {
|
|
370
|
+
return 1
|
|
371
|
+
} else if (position & Node.DOCUMENT_POSITION_PRECEDING) {
|
|
372
|
+
return -1
|
|
373
|
+
}
|
|
374
|
+
/* eslint-enable no-bitwise */
|
|
375
|
+
return 0
|
|
376
|
+
})
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function traverseRemovedShadowDom(removedNode: Node, shadowDomRemovedCallback: RemoveShadowRootCallBack) {
|
|
380
|
+
if (isNodeShadowHost(removedNode)) {
|
|
381
|
+
shadowDomRemovedCallback(removedNode.shadowRoot)
|
|
382
|
+
}
|
|
383
|
+
forEachChildNodes(removedNode, (childNode) => traverseRemovedShadowDom(childNode, shadowDomRemovedCallback))
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export function idsAreAssignedForNodeAndAncestors(node: Node, nodeIds: NodeIds): node is NodeWithSerializedNode {
|
|
387
|
+
let current: Node | null = node
|
|
388
|
+
while (current) {
|
|
389
|
+
if (nodeIds.get(current) === undefined && !isNodeShadowRoot(current)) {
|
|
390
|
+
return false
|
|
391
|
+
}
|
|
392
|
+
current = getParentNode(current)
|
|
393
|
+
}
|
|
394
|
+
return true
|
|
395
|
+
}
|