@kubesense/kubesense-browser-rum 1.0.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 +34 -0
- package/bundle/chunks/profiler-b64730a2109c3ddbc539-kubesense-rum.js +1 -0
- package/bundle/chunks/recorder-9ae532a18bac5f4280da-kubesense-rum.js +1 -0
- package/bundle/kubesense-rum.js +1 -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 +4 -0
- package/cjs/boot/lazyLoadProfiler.js +54 -0
- package/cjs/boot/lazyLoadProfiler.js.map +1 -0
- package/cjs/boot/lazyLoadRecorder.d.ts +4 -0
- package/cjs/boot/lazyLoadRecorder.js +54 -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 +53 -0
- package/cjs/boot/profilerApi.js.map +1 -0
- package/cjs/boot/recorderApi.d.ts +4 -0
- package/cjs/boot/recorderApi.js +73 -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 +30 -0
- package/cjs/domain/deflate/deflateWorker.js +104 -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 +10 -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/profiler.d.ts +7 -0
- package/cjs/domain/profiling/profiler.js +244 -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 +28 -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 +21 -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 +25 -0
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.js +50 -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 +72 -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 +7 -0
- package/cjs/domain/profiling/utils/getNumberOfSamples.js +18 -0
- package/cjs/domain/profiling/utils/getNumberOfSamples.js.map +1 -0
- package/cjs/domain/record/assembly.d.ts +2 -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/eventIds.d.ts +4 -0
- package/cjs/domain/record/eventIds.js +16 -0
- package/cjs/domain/record/eventIds.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 +7 -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 +57 -0
- package/cjs/domain/record/internalApi.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/nodeIds.d.ts +15 -0
- package/cjs/domain/record/nodeIds.js +32 -0
- package/cjs/domain/record/nodeIds.js.map +1 -0
- package/cjs/domain/record/record.d.ts +16 -0
- package/cjs/domain/record/record.js +90 -0
- package/cjs/domain/record/record.js.map +1 -0
- package/cjs/domain/record/record.types.d.ts +4 -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 +19 -0
- package/cjs/domain/record/recordingScope.js +13 -0
- package/cjs/domain/record/recordingScope.js.map +1 -0
- package/cjs/domain/record/serialization/index.d.ts +8 -0
- package/cjs/domain/record/serialization/index.js +18 -0
- package/cjs/domain/record/serialization/index.js.map +1 -0
- package/cjs/domain/record/serialization/serialization.types.d.ts +28 -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 +45 -0
- package/cjs/domain/record/serialization/serializationTransaction.js +38 -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/serializeDocument.d.ts +3 -0
- package/cjs/domain/record/serialization/serializeDocument.js +11 -0
- package/cjs/domain/record/serialization/serializeDocument.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/serializeStyleSheets.d.ts +2 -0
- package/cjs/domain/record/serialization/serializeStyleSheets.js +19 -0
- package/cjs/domain/record/serialization/serializeStyleSheets.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 +9 -0
- package/cjs/domain/record/startFullSnapshots.js +59 -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 +7 -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 +11 -0
- package/cjs/domain/record/trackers/trackMutation.js +270 -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 +47 -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 +2 -0
- package/cjs/types/index.js +18 -0
- package/cjs/types/index.js.map +1 -0
- package/cjs/types/sessionReplay.d.ts +703 -0
- package/cjs/types/sessionReplay.js +7 -0
- package/cjs/types/sessionReplay.js.map +1 -0
- package/cjs/types/sessionReplayConstants.d.ts +49 -0
- package/cjs/types/sessionReplayConstants.js +49 -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 +4 -0
- package/esm/boot/lazyLoadProfiler.js +18 -0
- package/esm/boot/lazyLoadProfiler.js.map +1 -0
- package/esm/boot/lazyLoadRecorder.d.ts +4 -0
- package/esm/boot/lazyLoadRecorder.js +18 -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 +50 -0
- package/esm/boot/profilerApi.js.map +1 -0
- package/esm/boot/recorderApi.d.ts +4 -0
- package/esm/boot/recorderApi.js +70 -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 +30 -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/profiler.d.ts +7 -0
- package/esm/domain/profiling/profiler.js +240 -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 +25 -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 +21 -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 +25 -0
- package/esm/domain/profiling/transport/buildProfileEventAttributes.js +47 -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 +72 -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 +7 -0
- package/esm/domain/profiling/utils/getNumberOfSamples.js +15 -0
- package/esm/domain/profiling/utils/getNumberOfSamples.js.map +1 -0
- package/esm/domain/record/assembly.d.ts +2 -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/eventIds.d.ts +4 -0
- package/esm/domain/record/eventIds.js +13 -0
- package/esm/domain/record/eventIds.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 +7 -0
- package/esm/domain/record/index.js +6 -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 +53 -0
- package/esm/domain/record/internalApi.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/nodeIds.d.ts +15 -0
- package/esm/domain/record/nodeIds.js +29 -0
- package/esm/domain/record/nodeIds.js.map +1 -0
- package/esm/domain/record/record.d.ts +16 -0
- package/esm/domain/record/record.js +54 -0
- package/esm/domain/record/record.js.map +1 -0
- package/esm/domain/record/record.types.d.ts +4 -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 +19 -0
- package/esm/domain/record/recordingScope.js +10 -0
- package/esm/domain/record/recordingScope.js.map +1 -0
- package/esm/domain/record/serialization/index.d.ts +8 -0
- package/esm/domain/record/serialization/index.js +7 -0
- package/esm/domain/record/serialization/index.js.map +1 -0
- package/esm/domain/record/serialization/serialization.types.d.ts +28 -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 +45 -0
- package/esm/domain/record/serialization/serializationTransaction.js +35 -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/serializeDocument.d.ts +3 -0
- package/esm/domain/record/serialization/serializeDocument.js +8 -0
- package/esm/domain/record/serialization/serializeDocument.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/serializeStyleSheets.d.ts +2 -0
- package/esm/domain/record/serialization/serializeStyleSheets.js +16 -0
- package/esm/domain/record/serialization/serializeStyleSheets.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 +9 -0
- package/esm/domain/record/startFullSnapshots.js +55 -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 +7 -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 +11 -0
- package/esm/domain/record/trackers/trackMutation.js +266 -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 +44 -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 +2 -0
- package/esm/types/index.js +2 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/sessionReplay.d.ts +703 -0
- package/esm/types/sessionReplay.js +6 -0
- package/esm/types/sessionReplay.js.map +1 -0
- package/esm/types/sessionReplayConstants.d.ts +49 -0
- package/esm/types/sessionReplayConstants.js +46 -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 +40 -0
- package/src/boot/isBrowserSupported.ts +14 -0
- package/src/boot/lazyLoadProfiler.ts +21 -0
- package/src/boot/lazyLoadRecorder.ts +21 -0
- package/src/boot/postStartStrategy.ts +176 -0
- package/src/boot/preStartStrategy.ts +34 -0
- package/src/boot/profilerApi.ts +86 -0
- package/src/boot/recorderApi.ts +124 -0
- package/src/boot/startRecording.ts +70 -0
- package/src/domain/deflate/deflateEncoder.ts +144 -0
- package/src/domain/deflate/deflateWorker.ts +157 -0
- package/src/domain/deflate/index.ts +8 -0
- package/src/domain/getSessionReplayLink.ts +40 -0
- package/src/domain/profiling/profiler.ts +338 -0
- package/src/domain/profiling/profilingContext.ts +34 -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 +78 -0
- package/src/domain/profiling/transport/buildProfileEventAttributes.ts +66 -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 +81 -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 +16 -0
- package/src/domain/record/assembly.ts +17 -0
- package/src/domain/record/elementsScrollPositions.ts +28 -0
- package/src/domain/record/eventIds.ts +17 -0
- package/src/domain/record/eventsUtils.ts +12 -0
- package/src/domain/record/index.ts +7 -0
- package/src/domain/record/internalApi.ts +88 -0
- package/src/domain/record/mutationBatch.ts +47 -0
- package/src/domain/record/nodeIds.ts +46 -0
- package/src/domain/record/record.ts +98 -0
- package/src/domain/record/record.types.ts +5 -0
- package/src/domain/record/recordingScope.ts +36 -0
- package/src/domain/record/serialization/index.ts +8 -0
- package/src/domain/record/serialization/serialization.types.ts +43 -0
- package/src/domain/record/serialization/serializationStats.ts +43 -0
- package/src/domain/record/serialization/serializationTransaction.ts +94 -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/serializeDocument.ts +13 -0
- package/src/domain/record/serialization/serializeNode.ts +229 -0
- package/src/domain/record/serialization/serializeStyleSheets.ts +18 -0
- package/src/domain/record/shadowRootsController.ts +62 -0
- package/src/domain/record/startFullSnapshots.ts +84 -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 +41 -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 +399 -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 +78 -0
- package/src/domain/segmentCollection/segmentCollection.ts +200 -0
- package/src/domain/segmentCollection/startSegmentTelemetry.ts +82 -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 +95 -0
- package/src/types/index.ts +2 -0
- package/src/types/sessionReplay.ts +734 -0
- package/src/types/sessionReplayConstants.ts +86 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { RumConfiguration } from '@kubesense/kubesense-browser-rum-core';
|
|
2
|
+
import type { RumProfilerTrace } from '../types';
|
|
3
|
+
import type { ProfileEventAttributes } from './buildProfileEventAttributes';
|
|
4
|
+
export interface ProfileEvent extends ProfileEventAttributes {
|
|
5
|
+
attachments: string[];
|
|
6
|
+
start: string;
|
|
7
|
+
end: string;
|
|
8
|
+
family: 'chrome';
|
|
9
|
+
runtime: 'chrome';
|
|
10
|
+
format: 'json';
|
|
11
|
+
version: 4;
|
|
12
|
+
tags_profiler: string;
|
|
13
|
+
_kubesense: {
|
|
14
|
+
clock_drift: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface ProfileEventPayload {
|
|
18
|
+
event: ProfileEvent;
|
|
19
|
+
'wall-time.json': RumProfilerTrace;
|
|
20
|
+
}
|
|
21
|
+
export declare function assembleProfilingPayload(profilerTrace: RumProfilerTrace, configuration: RumConfiguration, sessionId: string | undefined): ProfileEventPayload;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assembleProfilingPayload = assembleProfilingPayload;
|
|
4
|
+
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
5
|
+
const buildProfileEventAttributes_1 = require("./buildProfileEventAttributes");
|
|
6
|
+
function assembleProfilingPayload(profilerTrace, configuration, sessionId) {
|
|
7
|
+
const event = buildProfileEvent(profilerTrace, configuration, sessionId);
|
|
8
|
+
return {
|
|
9
|
+
event,
|
|
10
|
+
'wall-time.json': profilerTrace,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function buildProfileEvent(profilerTrace, configuration, sessionId) {
|
|
14
|
+
const tags = (0, kubesense_browser_core_1.buildTags)(configuration); // TODO: get that from the tagContext hook
|
|
15
|
+
const profileAttributes = (0, buildProfileEventAttributes_1.buildProfileEventAttributes)(profilerTrace, configuration.applicationId, sessionId);
|
|
16
|
+
const profileEventTags = buildProfileEventTags(tags);
|
|
17
|
+
const profileEvent = {
|
|
18
|
+
...profileAttributes,
|
|
19
|
+
attachments: ['wall-time.json'],
|
|
20
|
+
start: new Date(profilerTrace.startClocks.timeStamp).toISOString(),
|
|
21
|
+
end: new Date(profilerTrace.endClocks.timeStamp).toISOString(),
|
|
22
|
+
family: 'chrome',
|
|
23
|
+
runtime: 'chrome',
|
|
24
|
+
format: 'json',
|
|
25
|
+
version: 4, // Ingestion event version (not the version application tag)
|
|
26
|
+
tags_profiler: profileEventTags.join(','),
|
|
27
|
+
_kubesense: {
|
|
28
|
+
clock_drift: (0, kubesense_browser_core_1.currentDrift)(),
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
return profileEvent;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Builds tags for the Profile Event.
|
|
35
|
+
*
|
|
36
|
+
* @param tags - RUM tags
|
|
37
|
+
* @returns Combined tags for the Profile Event.
|
|
38
|
+
*/
|
|
39
|
+
function buildProfileEventTags(tags) {
|
|
40
|
+
// Tags already contains the common tags for all events. (service, env, version, etc.)
|
|
41
|
+
// Here we are adding some specific-to-profiling tags.
|
|
42
|
+
const profileEventTags = tags.concat(['language:javascript', 'runtime:chrome', 'family:chrome', 'host:browser']);
|
|
43
|
+
return profileEventTags;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=assembly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assembly.js","sourceRoot":"","sources":["../../../../src/domain/profiling/transport/assembly.ts"],"names":[],"mappings":";;AAyBA,4DAWC;AApCD,8EAA2E;AAG3E,+EAA2E;AAsB3E,SAAgB,wBAAwB,CACtC,aAA+B,EAC/B,aAA+B,EAC/B,SAA6B;IAE7B,MAAM,KAAK,GAAG,iBAAiB,CAAC,aAAa,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;IAExE,OAAO;QACL,KAAK;QACL,gBAAgB,EAAE,aAAa;KAChC,CAAA;AACH,CAAC;AAED,SAAS,iBAAiB,CACxB,aAA+B,EAC/B,aAA+B,EAC/B,SAA6B;IAE7B,MAAM,IAAI,GAAG,IAAA,kCAAS,EAAC,aAAa,CAAC,CAAA,CAAC,0CAA0C;IAChF,MAAM,iBAAiB,GAAG,IAAA,yDAA2B,EAAC,aAAa,EAAE,aAAa,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;IAC5G,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAA;IAEpD,MAAM,YAAY,GAAiB;QACjC,GAAG,iBAAiB;QACpB,WAAW,EAAE,CAAC,gBAAgB,CAAC;QAC/B,KAAK,EAAE,IAAI,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;QAClE,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;QAC9D,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,CAAC,EAAE,4DAA4D;QACxE,aAAa,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC;QACzC,UAAU,EAAE;YACV,WAAW,EAAE,IAAA,qCAAY,GAAE;SAC5B;KACF,CAAA;IAED,OAAO,YAAY,CAAA;AACrB,CAAC;AAED;;;;;GAKG;AACH,SAAS,qBAAqB,CAAC,IAAc;IAC3C,sFAAsF;IACtF,sDAAsD;IACtD,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,qBAAqB,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC,CAAA;IAEhH,OAAO,gBAAgB,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RumProfilerTrace } from '../types';
|
|
2
|
+
export interface ProfileEventAttributes {
|
|
3
|
+
application: {
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
session?: {
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
view?: {
|
|
10
|
+
id: string[];
|
|
11
|
+
name: string[];
|
|
12
|
+
};
|
|
13
|
+
long_task?: {
|
|
14
|
+
id: string[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Builds attributes for the Profile Event.
|
|
19
|
+
*
|
|
20
|
+
* @param profilerTrace - Profiler trace
|
|
21
|
+
* @param applicationId - application id.
|
|
22
|
+
* @param sessionId - session id.
|
|
23
|
+
* @returns Additional attributes.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildProfileEventAttributes(profilerTrace: RumProfilerTrace, applicationId: string, sessionId: string | undefined): ProfileEventAttributes;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildProfileEventAttributes = buildProfileEventAttributes;
|
|
4
|
+
/**
|
|
5
|
+
* Builds attributes for the Profile Event.
|
|
6
|
+
*
|
|
7
|
+
* @param profilerTrace - Profiler trace
|
|
8
|
+
* @param applicationId - application id.
|
|
9
|
+
* @param sessionId - session id.
|
|
10
|
+
* @returns Additional attributes.
|
|
11
|
+
*/
|
|
12
|
+
function buildProfileEventAttributes(profilerTrace, applicationId, sessionId) {
|
|
13
|
+
const attributes = {
|
|
14
|
+
application: {
|
|
15
|
+
id: applicationId,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
if (sessionId) {
|
|
19
|
+
attributes.session = {
|
|
20
|
+
id: sessionId,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
// Extract view ids and names from the profiler trace and add them as attributes of the profile event.
|
|
24
|
+
// This will be used to filter the profiles by @view.id and/or @view.name.
|
|
25
|
+
const { ids, names } = extractViewIdsAndNames(profilerTrace.views);
|
|
26
|
+
if (ids.length) {
|
|
27
|
+
attributes.view = {
|
|
28
|
+
id: ids,
|
|
29
|
+
name: names,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const longTaskIds = profilerTrace.longTasks.map((longTask) => longTask.id).filter((id) => id !== undefined);
|
|
33
|
+
if (longTaskIds.length) {
|
|
34
|
+
attributes.long_task = { id: longTaskIds };
|
|
35
|
+
}
|
|
36
|
+
return attributes;
|
|
37
|
+
}
|
|
38
|
+
function extractViewIdsAndNames(views) {
|
|
39
|
+
const result = { ids: [], names: [] };
|
|
40
|
+
for (const view of views) {
|
|
41
|
+
result.ids.push(view.viewId);
|
|
42
|
+
if (view.viewName) {
|
|
43
|
+
result.names.push(view.viewName);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// Remove duplicates
|
|
47
|
+
result.names = Array.from(new Set(result.names));
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=buildProfileEventAttributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildProfileEventAttributes.js","sourceRoot":"","sources":["../../../../src/domain/profiling/transport/buildProfileEventAttributes.ts"],"names":[],"mappings":";;AAiBA,kEAgCC;AAxCD;;;;;;;GAOG;AACH,SAAgB,2BAA2B,CACzC,aAA+B,EAC/B,aAAqB,EACrB,SAA6B;IAE7B,MAAM,UAAU,GAA2B;QACzC,WAAW,EAAE;YACX,EAAE,EAAE,aAAa;SAClB;KACF,CAAA;IACD,IAAI,SAAS,EAAE,CAAC;QACd,UAAU,CAAC,OAAO,GAAG;YACnB,EAAE,EAAE,SAAS;SACd,CAAA;IACH,CAAC;IAED,sGAAsG;IACtG,0EAA0E;IAC1E,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,sBAAsB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAElE,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QACf,UAAU,CAAC,IAAI,GAAG;YAChB,EAAE,EAAE,GAAG;YACP,IAAI,EAAE,KAAK;SACZ,CAAA;IACH,CAAC;IACD,MAAM,WAAW,GAAa,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC,CAAA;IAErH,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;QACvB,UAAU,CAAC,SAAS,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE,CAAA;IAC5C,CAAC;IACD,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAqB;IACnD,MAAM,MAAM,GAAuC,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;IACzE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAE5B,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAClC,CAAC;IACH,CAAC;IAED,oBAAoB;IACpB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IAEhD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/profiling/types/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface ProfilerFrame {
|
|
2
|
+
/** A function instance name. */
|
|
3
|
+
readonly name: string;
|
|
4
|
+
/** Index in the trace.resources array. */
|
|
5
|
+
readonly resourceId?: number;
|
|
6
|
+
/** 1-based index of the line. */
|
|
7
|
+
readonly line?: number;
|
|
8
|
+
/** 1-based index of the column. */
|
|
9
|
+
readonly column?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ProfilerStack {
|
|
12
|
+
/** Index in the trace.stacks array. */
|
|
13
|
+
readonly parentId?: number;
|
|
14
|
+
/** Index in the trace.frames array. */
|
|
15
|
+
readonly frameId: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ProfilerSample {
|
|
18
|
+
/** High resolution time relative to the profiling session's time origin. */
|
|
19
|
+
readonly timestamp: number;
|
|
20
|
+
/** Index in the trace.stacks array. */
|
|
21
|
+
readonly stackId?: number;
|
|
22
|
+
}
|
|
23
|
+
export type ProfilerResource = string;
|
|
24
|
+
export interface ProfilerTrace {
|
|
25
|
+
/** An array of profiler resources. */
|
|
26
|
+
readonly resources: ProfilerResource[];
|
|
27
|
+
/** An array of profiler frames. */
|
|
28
|
+
readonly frames: ProfilerFrame[];
|
|
29
|
+
/** An array of profiler stacks. */
|
|
30
|
+
readonly stacks: ProfilerStack[];
|
|
31
|
+
/** An array of profiler samples. */
|
|
32
|
+
readonly samples: ProfilerSample[];
|
|
33
|
+
}
|
|
34
|
+
export interface ProfilerInitOptions {
|
|
35
|
+
/** Sample interval in ms. */
|
|
36
|
+
readonly sampleInterval: number;
|
|
37
|
+
/** Max buffer size in number of samples. */
|
|
38
|
+
readonly maxBufferSize: number;
|
|
39
|
+
}
|
|
40
|
+
export interface Profiler extends EventTarget {
|
|
41
|
+
/** Sample interval in ms. */
|
|
42
|
+
readonly sampleInterval: number;
|
|
43
|
+
/** True if profiler is stopped. */
|
|
44
|
+
readonly stopped: boolean;
|
|
45
|
+
new (options: ProfilerInitOptions): Profiler;
|
|
46
|
+
stop(): Promise<ProfilerTrace>;
|
|
47
|
+
addEventListener<K extends keyof ProfilerEventMap>(type: K, listener: (this: typeof globalThis, ev: ProfilerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
48
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
49
|
+
removeEventListener<K extends keyof ProfilerEventMap>(type: K, listener: (this: typeof globalThis, ev: ProfilerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
50
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
51
|
+
}
|
|
52
|
+
interface ProfilerEventMap {
|
|
53
|
+
samplebufferfull: SampleBufferFullEvent;
|
|
54
|
+
}
|
|
55
|
+
export interface SampleBufferFullEvent extends Event {
|
|
56
|
+
readonly target: Profiler;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profilerApi.types.js","sourceRoot":"","sources":["../../../../src/domain/profiling/types/profilerApi.types.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,4CAA4C"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { TimeoutId, ClocksState } from '@kubesense/kubesense-browser-core';
|
|
2
|
+
import type { LongTaskContext } from '@kubesense/kubesense-browser-rum-core';
|
|
3
|
+
import type { ProfilerTrace, Profiler } from './profilerApi.types';
|
|
4
|
+
export interface RumViewEntry {
|
|
5
|
+
/** Detected start time of view */
|
|
6
|
+
readonly startClocks: ClocksState;
|
|
7
|
+
/** RUM view id */
|
|
8
|
+
readonly viewId: string;
|
|
9
|
+
/** RUM view name */
|
|
10
|
+
readonly viewName: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Additional data recorded during profiling session
|
|
14
|
+
*/
|
|
15
|
+
export interface RumProfilerEnrichmentData {
|
|
16
|
+
/** List of detected long tasks */
|
|
17
|
+
readonly longTasks: LongTaskContext[];
|
|
18
|
+
/** List of detected navigation entries */
|
|
19
|
+
readonly views: RumViewEntry[];
|
|
20
|
+
}
|
|
21
|
+
export interface RumProfilerTrace extends ProfilerTrace, RumProfilerEnrichmentData {
|
|
22
|
+
/** High resolution time when profiler trace started, relative to the profiling session's time origin */
|
|
23
|
+
readonly startClocks: ClocksState;
|
|
24
|
+
/** High resolution time when profiler trace ended, relative to the profiling session's time origin */
|
|
25
|
+
readonly endClocks: ClocksState;
|
|
26
|
+
/** Time origin of the profiling session */
|
|
27
|
+
readonly clocksOrigin: ClocksState;
|
|
28
|
+
/** Sample interval in milliseconds */
|
|
29
|
+
readonly sampleInterval: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Describes profiler session state when it's stopped
|
|
33
|
+
*/
|
|
34
|
+
export interface RumProfilerStoppedInstance {
|
|
35
|
+
readonly state: 'stopped';
|
|
36
|
+
readonly stateReason: 'session-expired' | 'stopped-by-user' | 'initializing';
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Describes profiler session state when it's paused
|
|
40
|
+
* (this happens when user focuses on a different tab)
|
|
41
|
+
*/
|
|
42
|
+
export interface RumProfilerPausedInstance {
|
|
43
|
+
readonly state: 'paused';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Describes profiler session state when it's running
|
|
47
|
+
*/
|
|
48
|
+
export interface RumProfilerRunningInstance extends RumProfilerEnrichmentData {
|
|
49
|
+
readonly state: 'running';
|
|
50
|
+
/** Current profiler instance */
|
|
51
|
+
readonly profiler: Profiler;
|
|
52
|
+
/** High resolution time when profiler session started */
|
|
53
|
+
readonly startClocks: ClocksState;
|
|
54
|
+
/** Timeout id to stop current session */
|
|
55
|
+
readonly timeoutId: TimeoutId;
|
|
56
|
+
/** Clean-up tasks to execute after running the Profiler */
|
|
57
|
+
readonly cleanupTasks: Array<() => void>;
|
|
58
|
+
}
|
|
59
|
+
export type RumProfilerInstance = RumProfilerStoppedInstance | RumProfilerPausedInstance | RumProfilerRunningInstance;
|
|
60
|
+
export interface RUMProfiler {
|
|
61
|
+
start: () => void;
|
|
62
|
+
stop: () => Promise<void>;
|
|
63
|
+
isStopped: () => boolean;
|
|
64
|
+
isRunning: () => boolean;
|
|
65
|
+
isPaused: () => boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface RUMProfilerConfiguration {
|
|
68
|
+
sampleIntervalMs: number;
|
|
69
|
+
collectIntervalMs: number;
|
|
70
|
+
minProfileDurationMs: number;
|
|
71
|
+
minNumberOfSamples: number;
|
|
72
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rumProfiler.types.js","sourceRoot":"","sources":["../../../../src/domain/profiling/types/rumProfiler.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCustomOrDefaultViewName: (customViewName: string | undefined, viewPathUrl: string) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCustomOrDefaultViewName = void 0;
|
|
4
|
+
const getDefaultViewName_1 = require("./getDefaultViewName");
|
|
5
|
+
const getCustomOrDefaultViewName = (customViewName, viewPathUrl) => customViewName || (0, getDefaultViewName_1.getDefaultViewName)(viewPathUrl);
|
|
6
|
+
exports.getCustomOrDefaultViewName = getCustomOrDefaultViewName;
|
|
7
|
+
//# sourceMappingURL=getCustomOrDefaultViewName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCustomOrDefaultViewName.js","sourceRoot":"","sources":["../../../../src/domain/profiling/utils/getCustomOrDefaultViewName.ts"],"names":[],"mappings":";;;AAAA,6DAAyD;AAElD,MAAM,0BAA0B,GAAG,CAAC,cAAkC,EAAE,WAAmB,EAAU,EAAE,CAC5G,cAAc,IAAI,IAAA,uCAAkB,EAAC,WAAW,CAAC,CAAA;AADtC,QAAA,0BAA0B,8BACY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getDefaultViewName(viewPathUrl: string): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultViewName = getDefaultViewName;
|
|
4
|
+
// This is the regex used to extract the path from the url (from SimpleUrlGroupingProcessor.java)
|
|
5
|
+
// It's a bit different from the one in the java code because we removed the lookbehind unsupported by Safari.
|
|
6
|
+
const PATH_MIXED_ALPHANUMERICS = /\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;
|
|
7
|
+
function getDefaultViewName(viewPathUrl) {
|
|
8
|
+
if (!viewPathUrl) {
|
|
9
|
+
return '/';
|
|
10
|
+
}
|
|
11
|
+
// Replace all the mixed alphanumerics with a ?
|
|
12
|
+
return viewPathUrl.replace(PATH_MIXED_ALPHANUMERICS, '/?');
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=getDefaultViewName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDefaultViewName.js","sourceRoot":"","sources":["../../../../src/domain/profiling/utils/getDefaultViewName.ts"],"names":[],"mappings":";;AAIA,gDAOC;AAXD,iGAAiG;AACjG,8GAA8G;AAC9G,MAAM,wBAAwB,GAAG,yCAAyC,CAAA;AAE1E,SAAgB,kBAAkB,CAAC,WAAmB;IACpD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,+CAA+C;IAC/C,OAAO,WAAW,CAAC,OAAO,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAA;AAC5D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ProfilerSample } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Counts number of samples when the thread was not idle (stackId is defined)
|
|
4
|
+
* @param samples Array of collected samples
|
|
5
|
+
* @returns Number of samples
|
|
6
|
+
*/
|
|
7
|
+
export declare function getNumberOfSamples(samples: ProfilerSample[]): number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNumberOfSamples = getNumberOfSamples;
|
|
4
|
+
/**
|
|
5
|
+
* Counts number of samples when the thread was not idle (stackId is defined)
|
|
6
|
+
* @param samples Array of collected samples
|
|
7
|
+
* @returns Number of samples
|
|
8
|
+
*/
|
|
9
|
+
function getNumberOfSamples(samples) {
|
|
10
|
+
let numberOfSamples = 0;
|
|
11
|
+
for (const sample of samples) {
|
|
12
|
+
if (sample.stackId !== undefined) {
|
|
13
|
+
numberOfSamples++;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return numberOfSamples;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=getNumberOfSamples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNumberOfSamples.js","sourceRoot":"","sources":["../../../../src/domain/profiling/utils/getNumberOfSamples.ts"],"names":[],"mappings":";;AAOA,gDAQC;AAbD;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,OAAyB;IAC1D,IAAI,eAAe,GAAG,CAAC,CAAA;IACvB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACjC,eAAe,EAAE,CAAA;QACnB,CAAC;IACH,CAAC;IACD,OAAO,eAAe,CAAA;AACxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assembleIncrementalSnapshot = assembleIncrementalSnapshot;
|
|
4
|
+
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
5
|
+
const types_1 = require("../../types");
|
|
6
|
+
function assembleIncrementalSnapshot(source, data) {
|
|
7
|
+
return {
|
|
8
|
+
data: {
|
|
9
|
+
source,
|
|
10
|
+
...data,
|
|
11
|
+
},
|
|
12
|
+
type: types_1.RecordType.IncrementalSnapshot,
|
|
13
|
+
timestamp: (0, kubesense_browser_core_1.timeStampNow)(),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=assembly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assembly.js","sourceRoot":"","sources":["../../../src/domain/record/assembly.ts"],"names":[],"mappings":";;AAIA,kEAYC;AAhBD,8EAAgE;AAEhE,uCAAwC;AAExC,SAAgB,2BAA2B,CACzC,MAAsB,EACtB,IAA0B;IAE1B,OAAO;QACL,IAAI,EAAE;YACJ,MAAM;YACN,GAAG,IAAI;SACA;QACT,IAAI,EAAE,kBAAU,CAAC,mBAAmB;QACpC,SAAS,EAAE,IAAA,qCAAY,GAAE;KAC1B,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ElementsScrollPositions = ReturnType<typeof createElementsScrollPositions>;
|
|
2
|
+
export interface ScrollPositions {
|
|
3
|
+
scrollLeft: number;
|
|
4
|
+
scrollTop: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function createElementsScrollPositions(): {
|
|
7
|
+
set(element: Element | Document, scrollPositions: ScrollPositions): void;
|
|
8
|
+
get(element: Element): ScrollPositions | undefined;
|
|
9
|
+
has(element: Element): boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createElementsScrollPositions = createElementsScrollPositions;
|
|
4
|
+
function createElementsScrollPositions() {
|
|
5
|
+
const scrollPositionsByElement = new WeakMap();
|
|
6
|
+
return {
|
|
7
|
+
set(element, scrollPositions) {
|
|
8
|
+
if (element === document && !document.scrollingElement) {
|
|
9
|
+
// cf https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement,
|
|
10
|
+
// in some cases scrolling elements can not be defined, we don't support those for now
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
scrollPositionsByElement.set(element === document ? document.scrollingElement : element, scrollPositions);
|
|
14
|
+
},
|
|
15
|
+
get(element) {
|
|
16
|
+
return scrollPositionsByElement.get(element);
|
|
17
|
+
},
|
|
18
|
+
has(element) {
|
|
19
|
+
return scrollPositionsByElement.has(element);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=elementsScrollPositions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementsScrollPositions.js","sourceRoot":"","sources":["../../../src/domain/record/elementsScrollPositions.ts"],"names":[],"mappings":";;AAMA,sEAqBC;AArBD,SAAgB,6BAA6B;IAC3C,MAAM,wBAAwB,GAAG,IAAI,OAAO,EAA4B,CAAA;IACxE,OAAO;QACL,GAAG,CAAC,OAA2B,EAAE,eAAgC;YAC/D,IAAI,OAAO,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;gBACvD,yEAAyE;gBACzE,sFAAsF;gBACtF,OAAM;YACR,CAAC;YACD,wBAAwB,CAAC,GAAG,CAC1B,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,gBAAiB,CAAC,CAAC,CAAE,OAAmB,EACxE,eAAe,CAChB,CAAA;QACH,CAAC;QACD,GAAG,CAAC,OAAgB;YAClB,OAAO,wBAAwB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC9C,CAAC;QACD,GAAG,CAAC,OAAgB;YAClB,OAAO,wBAAwB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC9C,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEventIds = createEventIds;
|
|
4
|
+
function createEventIds() {
|
|
5
|
+
const eventIds = new WeakMap();
|
|
6
|
+
let nextId = 1;
|
|
7
|
+
return {
|
|
8
|
+
getIdForEvent(event) {
|
|
9
|
+
if (!eventIds.has(event)) {
|
|
10
|
+
eventIds.set(event, nextId++);
|
|
11
|
+
}
|
|
12
|
+
return eventIds.get(event);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=eventIds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventIds.js","sourceRoot":"","sources":["../../../src/domain/record/eventIds.ts"],"names":[],"mappings":";;AAIA,wCAYC;AAZD,SAAgB,cAAc;IAC5B,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAiB,CAAA;IAC7C,IAAI,MAAM,GAAG,CAAC,CAAA;IAEd,OAAO;QACL,aAAa,CAAC,KAAY;YACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;YAC/B,CAAC;YACD,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAE,CAAA;QAC7B,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTouchEvent = isTouchEvent;
|
|
4
|
+
exports.getEventTarget = getEventTarget;
|
|
5
|
+
const kubesense_browser_rum_core_1 = require("@kubesense/kubesense-browser-rum-core");
|
|
6
|
+
function isTouchEvent(event) {
|
|
7
|
+
return Boolean(event.changedTouches);
|
|
8
|
+
}
|
|
9
|
+
function getEventTarget(event) {
|
|
10
|
+
if (event.composed === true && (0, kubesense_browser_rum_core_1.isNodeShadowHost)(event.target)) {
|
|
11
|
+
return event.composedPath()[0];
|
|
12
|
+
}
|
|
13
|
+
return event.target;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=eventsUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventsUtils.js","sourceRoot":"","sources":["../../../src/domain/record/eventsUtils.ts"],"names":[],"mappings":";;AAEA,oCAEC;AAED,wCAKC;AAXD,sFAAwE;AAExE,SAAgB,YAAY,CAAC,KAA8B;IACzD,OAAO,OAAO,CAAE,KAAoB,CAAC,cAAc,CAAC,CAAA;AACtD,CAAC;AAED,SAAgB,cAAc,CAAC,KAAY;IACzC,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAA,6CAAgB,EAAC,KAAK,CAAC,MAAc,CAAC,EAAE,CAAC;QACtE,OAAO,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAS,CAAA;IACxC,CAAC;IACD,OAAO,KAAK,CAAC,MAAc,CAAA;AAC7B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { takeFullSnapshot, takeNodeSnapshot } from './internalApi';
|
|
2
|
+
export { record } from './record';
|
|
3
|
+
export type { SerializationMetric, SerializationStats } from './serialization';
|
|
4
|
+
export { createSerializationStats, aggregateSerializationStats } from './serialization';
|
|
5
|
+
export { serializeNode, serializeDocument } from './serialization';
|
|
6
|
+
export { createElementsScrollPositions } from './elementsScrollPositions';
|
|
7
|
+
export type { ShadowRootsController } from './shadowRootsController';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createElementsScrollPositions = exports.serializeDocument = exports.serializeNode = exports.aggregateSerializationStats = exports.createSerializationStats = exports.record = exports.takeNodeSnapshot = exports.takeFullSnapshot = void 0;
|
|
4
|
+
var internalApi_1 = require("./internalApi");
|
|
5
|
+
Object.defineProperty(exports, "takeFullSnapshot", { enumerable: true, get: function () { return internalApi_1.takeFullSnapshot; } });
|
|
6
|
+
Object.defineProperty(exports, "takeNodeSnapshot", { enumerable: true, get: function () { return internalApi_1.takeNodeSnapshot; } });
|
|
7
|
+
var record_1 = require("./record");
|
|
8
|
+
Object.defineProperty(exports, "record", { enumerable: true, get: function () { return record_1.record; } });
|
|
9
|
+
var serialization_1 = require("./serialization");
|
|
10
|
+
Object.defineProperty(exports, "createSerializationStats", { enumerable: true, get: function () { return serialization_1.createSerializationStats; } });
|
|
11
|
+
Object.defineProperty(exports, "aggregateSerializationStats", { enumerable: true, get: function () { return serialization_1.aggregateSerializationStats; } });
|
|
12
|
+
var serialization_2 = require("./serialization");
|
|
13
|
+
Object.defineProperty(exports, "serializeNode", { enumerable: true, get: function () { return serialization_2.serializeNode; } });
|
|
14
|
+
Object.defineProperty(exports, "serializeDocument", { enumerable: true, get: function () { return serialization_2.serializeDocument; } });
|
|
15
|
+
var elementsScrollPositions_1 = require("./elementsScrollPositions");
|
|
16
|
+
Object.defineProperty(exports, "createElementsScrollPositions", { enumerable: true, get: function () { return elementsScrollPositions_1.createElementsScrollPositions; } });
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/record/index.ts"],"names":[],"mappings":";;;AAAA,6CAAkE;AAAzD,+GAAA,gBAAgB,OAAA;AAAE,+GAAA,gBAAgB,OAAA;AAC3C,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AAEf,iDAAuF;AAA9E,yHAAA,wBAAwB,OAAA;AAAE,4HAAA,2BAA2B,OAAA;AAC9D,iDAAkE;AAAzD,8GAAA,aAAa,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AACzC,qEAAyE;AAAhE,wIAAA,6BAA6B,OAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RumConfiguration } from '@kubesense/kubesense-browser-rum-core';
|
|
2
|
+
import type { BrowserRecord, SerializedNodeWithId } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Take a full snapshot of the document, generating the same records that the Kubesense browser SDK
|
|
5
|
+
* would generate.
|
|
6
|
+
*
|
|
7
|
+
* This is an internal API function. Be sure to update kubesense-internal callers if you
|
|
8
|
+
* change its signature or behavior.
|
|
9
|
+
*/
|
|
10
|
+
export declare function takeFullSnapshot({ configuration, }?: {
|
|
11
|
+
configuration?: Partial<RumConfiguration>;
|
|
12
|
+
}): BrowserRecord[];
|
|
13
|
+
/**
|
|
14
|
+
* Take a snapshot of a DOM node, generating the serialized representation that the
|
|
15
|
+
* kubesense browser SDK would generate.
|
|
16
|
+
*
|
|
17
|
+
* This is an internal API function. Be sure to update Kubesense-internal callers if you
|
|
18
|
+
* change its signature or behavior.
|
|
19
|
+
*/
|
|
20
|
+
export declare function takeNodeSnapshot(node: Node, { configuration }?: {
|
|
21
|
+
configuration?: Partial<RumConfiguration>;
|
|
22
|
+
}): SerializedNodeWithId | null;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.takeFullSnapshot = takeFullSnapshot;
|
|
4
|
+
exports.takeNodeSnapshot = takeNodeSnapshot;
|
|
5
|
+
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
6
|
+
const kubesense_browser_rum_core_1 = require("@kubesense/kubesense-browser-rum-core");
|
|
7
|
+
const startFullSnapshots_1 = require("./startFullSnapshots");
|
|
8
|
+
const recordingScope_1 = require("./recordingScope");
|
|
9
|
+
const elementsScrollPositions_1 = require("./elementsScrollPositions");
|
|
10
|
+
const eventIds_1 = require("./eventIds");
|
|
11
|
+
const nodeIds_1 = require("./nodeIds");
|
|
12
|
+
const serialization_1 = require("./serialization");
|
|
13
|
+
/**
|
|
14
|
+
* Take a full snapshot of the document, generating the same records that the Kubesense browser SDK
|
|
15
|
+
* would generate.
|
|
16
|
+
*
|
|
17
|
+
* This is an internal API function. Be sure to update kubesense-internal callers if you
|
|
18
|
+
* change its signature or behavior.
|
|
19
|
+
*/
|
|
20
|
+
function takeFullSnapshot({ configuration, } = {}) {
|
|
21
|
+
const records = [];
|
|
22
|
+
const emitRecord = (record) => {
|
|
23
|
+
records.push(record);
|
|
24
|
+
};
|
|
25
|
+
(0, startFullSnapshots_1.takeFullSnapshot)((0, kubesense_browser_core_1.timeStampNow)(), 0 /* SerializationKind.INITIAL_FULL_SNAPSHOT */, emitRecord, kubesense_browser_core_1.noop, createTemporaryRecordingScope(configuration));
|
|
26
|
+
return records;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Take a snapshot of a DOM node, generating the serialized representation that the
|
|
30
|
+
* kubesense browser SDK would generate.
|
|
31
|
+
*
|
|
32
|
+
* This is an internal API function. Be sure to update Kubesense-internal callers if you
|
|
33
|
+
* change its signature or behavior.
|
|
34
|
+
*/
|
|
35
|
+
function takeNodeSnapshot(node, { configuration } = {}) {
|
|
36
|
+
let serializedNode = null;
|
|
37
|
+
(0, serialization_1.serializeInTransaction)(0 /* SerializationKind.INITIAL_FULL_SNAPSHOT */, kubesense_browser_core_1.noop, kubesense_browser_core_1.noop, createTemporaryRecordingScope(configuration), (transaction) => {
|
|
38
|
+
const privacyLevel = (0, kubesense_browser_rum_core_1.getNodePrivacyLevel)(node, transaction.scope.configuration.defaultPrivacyLevel);
|
|
39
|
+
if (privacyLevel === kubesense_browser_rum_core_1.NodePrivacyLevel.HIDDEN || privacyLevel === kubesense_browser_rum_core_1.NodePrivacyLevel.IGNORE) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
serializedNode = (0, serialization_1.serializeNode)(node, privacyLevel, transaction);
|
|
43
|
+
});
|
|
44
|
+
return serializedNode;
|
|
45
|
+
}
|
|
46
|
+
function createTemporaryRecordingScope(configuration) {
|
|
47
|
+
return (0, recordingScope_1.createRecordingScope)({
|
|
48
|
+
defaultPrivacyLevel: kubesense_browser_rum_core_1.NodePrivacyLevel.ALLOW,
|
|
49
|
+
...configuration,
|
|
50
|
+
}, (0, elementsScrollPositions_1.createElementsScrollPositions)(), (0, eventIds_1.createEventIds)(), (0, nodeIds_1.createNodeIds)(), {
|
|
51
|
+
addShadowRoot: kubesense_browser_core_1.noop,
|
|
52
|
+
removeShadowRoot: kubesense_browser_core_1.noop,
|
|
53
|
+
flush: kubesense_browser_core_1.noop,
|
|
54
|
+
stop: kubesense_browser_core_1.noop,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=internalApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internalApi.js","sourceRoot":"","sources":["../../../src/domain/record/internalApi.ts"],"names":[],"mappings":";;AAsBA,4CAiBC;AASD,4CAqBC;AArED,8EAAsE;AAEtE,sFAA6F;AAE7F,6DAA6E;AAG7E,qDAAuD;AACvD,uEAAyE;AACzE,yCAA2C;AAC3C,uCAAyC;AAGzC,mDAA0F;AAE1F;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,EAC/B,aAAa,MACoC,EAAE;IACnD,MAAM,OAAO,GAAoB,EAAE,CAAA;IACnC,MAAM,UAAU,GAAuB,CAAC,MAAqB,EAAE,EAAE;QAC/D,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACtB,CAAC,CAAA;IAED,IAAA,qCAAkB,EAChB,IAAA,qCAAY,GAAE,mDAEd,UAAU,EACV,6BAAI,EACJ,6BAA6B,CAAC,aAAa,CAAC,CAC7C,CAAA;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAC9B,IAAU,EACV,EAAE,aAAa,KAAoD,EAAE;IAErE,IAAI,cAAc,GAAgC,IAAI,CAAA;IAEtD,IAAA,sCAAsB,mDAEpB,6BAAI,EACJ,6BAAI,EACJ,6BAA6B,CAAC,aAAa,CAAC,EAC5C,CAAC,WAAqC,EAAQ,EAAE;QAC9C,MAAM,YAAY,GAAG,IAAA,gDAAmB,EAAC,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAA;QACnG,IAAI,YAAY,KAAK,6CAAgB,CAAC,MAAM,IAAI,YAAY,KAAK,6CAAgB,CAAC,MAAM,EAAE,CAAC;YACzF,OAAM;QACR,CAAC;QACD,cAAc,GAAG,IAAA,6BAAa,EAAC,IAAI,EAAE,YAAY,EAAE,WAAW,CAAC,CAAA;IACjE,CAAC,CACF,CAAA;IAED,OAAO,cAAc,CAAA;AACvB,CAAC;AAED,SAAS,6BAA6B,CAAC,aAAyC;IAC9E,OAAO,IAAA,qCAAoB,EACzB;QACE,mBAAmB,EAAE,6CAAgB,CAAC,KAAK;QAC3C,GAAG,aAAa;KACG,EACrB,IAAA,uDAA6B,GAAE,EAC/B,IAAA,yBAAc,GAAE,EAChB,IAAA,uBAAa,GAAE,EACf;QACE,aAAa,EAAE,6BAAI;QACnB,gBAAgB,EAAE,6BAAI;QACtB,KAAK,EAAE,6BAAI;QACX,IAAI,EAAE,6BAAI;KACc,CAC3B,CAAA;AACH,CAAC"}
|