@cloudcare/browser-rum 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dataflux-rum.js +1 -1
- package/cjs/boot/buildEnv.js +1 -1
- package/cjs/boot/recorderApi.js +44 -1
- package/cjs/boot/recorderApi.js.map +1 -1
- package/cjs/boot/rumPublicApi.js +11 -0
- package/cjs/boot/rumPublicApi.js.map +1 -1
- package/cjs/boot/startRecording.js +6 -1
- package/cjs/boot/startRecording.js.map +1 -1
- package/cjs/domain/deflate/deflateWorker.js +1 -1
- package/cjs/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/cjs/domain/replay/record/mutationObserver.js +14 -1
- package/cjs/domain/replay/record/mutationObserver.js.map +1 -1
- package/cjs/domain/replay/record/record.js +39 -0
- package/cjs/domain/replay/record/record.js.map +1 -1
- package/cjs/domain/tracing/jaegerTracer.js +6 -6
- package/cjs/domain/tracing/jaegerTracer.js.map +1 -1
- package/cjs/domain/tracing/traceIdentifier.js +22 -0
- package/cjs/domain/tracing/traceIdentifier.js.map +1 -1
- package/cjs/domain/tracing/zipkinMultiTracer.js +6 -6
- package/cjs/domain/tracing/zipkinMultiTracer.js.map +1 -1
- package/cjs/domain/tracing/zipkinSingleTracer.js +6 -6
- package/cjs/domain/tracing/zipkinSingleTracer.js.map +1 -1
- package/esm/boot/buildEnv.js +1 -1
- package/esm/boot/recorderApi.js +44 -1
- package/esm/boot/recorderApi.js.map +1 -1
- package/esm/boot/rumPublicApi.js +11 -0
- package/esm/boot/rumPublicApi.js.map +1 -1
- package/esm/boot/startRecording.js +6 -1
- package/esm/boot/startRecording.js.map +1 -1
- package/esm/domain/deflate/deflateWorker.js +1 -1
- package/esm/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/esm/domain/replay/record/mutationObserver.js +14 -1
- package/esm/domain/replay/record/mutationObserver.js.map +1 -1
- package/esm/domain/replay/record/record.js +39 -0
- package/esm/domain/replay/record/record.js.map +1 -1
- package/esm/domain/tracing/jaegerTracer.js +7 -7
- package/esm/domain/tracing/jaegerTracer.js.map +1 -1
- package/esm/domain/tracing/traceIdentifier.js +20 -0
- package/esm/domain/tracing/traceIdentifier.js.map +1 -1
- package/esm/domain/tracing/zipkinMultiTracer.js +7 -7
- package/esm/domain/tracing/zipkinMultiTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinSingleTracer.js +7 -7
- package/esm/domain/tracing/zipkinSingleTracer.js.map +1 -1
- package/package.json +2 -2
- package/src/boot/recorderApi.js +47 -1
- package/src/boot/rumPublicApi.js +11 -0
- package/src/boot/startRecording.js +6 -1
- package/src/domain/replay/record/mutationObserver.js +14 -1
- package/src/domain/replay/record/record.js +46 -0
- package/src/domain/tracing/jaegerTracer.js +16 -9
- package/src/domain/tracing/traceIdentifier.js +24 -0
- package/src/domain/tracing/zipkinMultiTracer.js +16 -9
- package/src/domain/tracing/zipkinSingleTracer.js +14 -7
- package/types/index.d.ts +15 -0
package/cjs/boot/buildEnv.js
CHANGED
package/cjs/boot/recorderApi.js
CHANGED
|
@@ -45,6 +45,12 @@ function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
45
45
|
getCanvasMutationHistoryForDebug: function getCanvasMutationHistoryForDebug() {
|
|
46
46
|
return undefined;
|
|
47
47
|
},
|
|
48
|
+
getLastDomMutationForDebug: function getLastDomMutationForDebug() {
|
|
49
|
+
return undefined;
|
|
50
|
+
},
|
|
51
|
+
getDomMutationHistoryForDebug: function getDomMutationHistoryForDebug() {
|
|
52
|
+
return undefined;
|
|
53
|
+
},
|
|
48
54
|
getLastReplaySegmentFlushForDebug: function getLastReplaySegmentFlushForDebug() {
|
|
49
55
|
return undefined;
|
|
50
56
|
},
|
|
@@ -54,6 +60,7 @@ function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
54
60
|
getReplayPerformanceForDebug: function getReplayPerformanceForDebug() {
|
|
55
61
|
return undefined;
|
|
56
62
|
},
|
|
63
|
+
flushReplayMutationsForDebug: _browserCore.noop,
|
|
57
64
|
getReplayStats: function getReplayStats() {
|
|
58
65
|
return undefined;
|
|
59
66
|
},
|
|
@@ -98,6 +105,12 @@ function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
98
105
|
var _getCanvasMutationHistoryForDebug = function getCanvasMutationHistoryForDebug() {
|
|
99
106
|
return undefined;
|
|
100
107
|
};
|
|
108
|
+
var _getLastDomMutationForDebug = function getLastDomMutationForDebug() {
|
|
109
|
+
return undefined;
|
|
110
|
+
};
|
|
111
|
+
var _getDomMutationHistoryForDebug = function getDomMutationHistoryForDebug() {
|
|
112
|
+
return undefined;
|
|
113
|
+
};
|
|
101
114
|
var _getLastReplaySegmentFlushForDebug = function getLastReplaySegmentFlushForDebug() {
|
|
102
115
|
return undefined;
|
|
103
116
|
};
|
|
@@ -107,6 +120,7 @@ function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
107
120
|
var _getReplayPerformanceForDebug = function getReplayPerformanceForDebug() {
|
|
108
121
|
return undefined;
|
|
109
122
|
};
|
|
123
|
+
var _flushReplayMutationsForDebug = _browserCore.noop;
|
|
110
124
|
return {
|
|
111
125
|
start: function start(options) {
|
|
112
126
|
startStrategy(options);
|
|
@@ -183,9 +197,12 @@ function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
183
197
|
getAutoCanvasSnapshotDebugHistoryForDebug: recordingImpl.getAutoCanvasSnapshotDebugHistoryForDebug || _browserCore.noop,
|
|
184
198
|
getLastCanvasMutationForDebug: recordingImpl.getLastCanvasMutationForDebug || _browserCore.noop,
|
|
185
199
|
getCanvasMutationHistoryForDebug: recordingImpl.getCanvasMutationHistoryForDebug || _browserCore.noop,
|
|
200
|
+
getLastDomMutationForDebug: recordingImpl.getLastDomMutationForDebug || _browserCore.noop,
|
|
201
|
+
getDomMutationHistoryForDebug: recordingImpl.getDomMutationHistoryForDebug || _browserCore.noop,
|
|
186
202
|
getLastReplaySegmentFlushForDebug: recordingImpl.getLastReplaySegmentFlushForDebug || _browserCore.noop,
|
|
187
203
|
getReplaySegmentFlushHistoryForDebug: recordingImpl.getReplaySegmentFlushHistoryForDebug || _browserCore.noop,
|
|
188
|
-
getReplayPerformanceForDebug: recordingImpl.getReplayPerformanceForDebug || _browserCore.noop
|
|
204
|
+
getReplayPerformanceForDebug: recordingImpl.getReplayPerformanceForDebug || _browserCore.noop,
|
|
205
|
+
flushReplayMutationsForDebug: recordingImpl.flushReplayMutationsForDebug || _browserCore.noop
|
|
189
206
|
};
|
|
190
207
|
});
|
|
191
208
|
};
|
|
@@ -242,6 +259,18 @@ function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
242
259
|
}
|
|
243
260
|
return undefined;
|
|
244
261
|
};
|
|
262
|
+
_getLastDomMutationForDebug = function getLastDomMutationForDebug() {
|
|
263
|
+
if (state.status === RecorderStatus.Started) {
|
|
264
|
+
return state.getLastDomMutationForDebug();
|
|
265
|
+
}
|
|
266
|
+
return undefined;
|
|
267
|
+
};
|
|
268
|
+
_getDomMutationHistoryForDebug = function getDomMutationHistoryForDebug() {
|
|
269
|
+
if (state.status === RecorderStatus.Started) {
|
|
270
|
+
return state.getDomMutationHistoryForDebug();
|
|
271
|
+
}
|
|
272
|
+
return undefined;
|
|
273
|
+
};
|
|
245
274
|
_getLastReplaySegmentFlushForDebug = function getLastReplaySegmentFlushForDebug() {
|
|
246
275
|
if (state.status === RecorderStatus.Started) {
|
|
247
276
|
return state.getLastReplaySegmentFlushForDebug();
|
|
@@ -260,6 +289,11 @@ function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
260
289
|
}
|
|
261
290
|
return undefined;
|
|
262
291
|
};
|
|
292
|
+
_flushReplayMutationsForDebug = function flushReplayMutationsForDebug() {
|
|
293
|
+
if (state.status === RecorderStatus.Started) {
|
|
294
|
+
state.flushReplayMutationsForDebug();
|
|
295
|
+
}
|
|
296
|
+
};
|
|
263
297
|
if (state.status === RecorderStatus.IntentToStart) {
|
|
264
298
|
startStrategy();
|
|
265
299
|
}
|
|
@@ -288,12 +322,21 @@ function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
|
288
322
|
getCanvasMutationHistoryForDebug: function getCanvasMutationHistoryForDebug() {
|
|
289
323
|
return _getCanvasMutationHistoryForDebug();
|
|
290
324
|
},
|
|
325
|
+
getLastDomMutationForDebug: function getLastDomMutationForDebug() {
|
|
326
|
+
return _getLastDomMutationForDebug();
|
|
327
|
+
},
|
|
328
|
+
getDomMutationHistoryForDebug: function getDomMutationHistoryForDebug() {
|
|
329
|
+
return _getDomMutationHistoryForDebug();
|
|
330
|
+
},
|
|
291
331
|
getReplaySegmentFlushHistoryForDebug: function getReplaySegmentFlushHistoryForDebug() {
|
|
292
332
|
return _getReplaySegmentFlushHistoryForDebug();
|
|
293
333
|
},
|
|
294
334
|
getReplayPerformanceForDebug: function getReplayPerformanceForDebug() {
|
|
295
335
|
return _getReplayPerformanceForDebug();
|
|
296
336
|
},
|
|
337
|
+
flushReplayMutationsForDebug: function flushReplayMutationsForDebug() {
|
|
338
|
+
_flushReplayMutationsForDebug();
|
|
339
|
+
},
|
|
297
340
|
isRecording: function isRecording() {
|
|
298
341
|
return (0, _deflate.getDeflateWorkerStatus)() === _deflate.DeflateWorkerStatus.Initialized && state.status === RecorderStatus.Started;
|
|
299
342
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorderApi.js","names":["_browserCore","require","_replayStats","_deflate","RecorderStatus","Stopped","IntentToStart","Starting","Started","makeRecorderApi","startRecordingImpl","createDeflateWorkerImpl","canUseEventBridge","bridgeSupports","BridgeCapability","RECORDS","isBrowserSupported","start","noop","stop","takeSubsequentFullSnapshot","snapshotCanvas","ok","reason","getSerializedNodeIdForDebug","undefined","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","getReplayPerformanceForDebug","getReplayStats","onRumStart","isRecording","state","status","startStrategy","stopStrategy","options","lifeCycle","configuration","sessionManager","viewContexts","worker","subscribe","LifeCycleEventType","SESSION_EXPIRED","PAGE_EXITED","pageExitEvent","PageExitReason","UNLOADING","SESSION_RENEWED","cachedDeflateEncoder","getOrCreateDeflateEncoder","startDeflateWorker","createDeflateEncoder","DeflateEncoderStreamId","REPLAY","session","findTrackedSession","sessionReplayAllowed","runOnReadyState","deflateEncoder","recordingImpl","stopRecording","canvas","node","getDeflateWorkerStatus","DeflateWorkerStatus","Initialized","viewId","getReplayStatsImpl","Array","from","CSSSupportsRule","URL","createObjectURL","NodeList","prototype"],"sources":["../../src/boot/recorderApi.js"],"sourcesContent":["import {\n noop,\n runOnReadyState,\n LifeCycleEventType,\n canUseEventBridge,\n bridgeSupports,\n BridgeCapability,\n PageExitReason\n} from '@cloudcare/browser-core'\n\nimport { getReplayStats as getReplayStatsImpl } from '../domain/replay/replayStats'\nimport {\n createDeflateEncoder,\n startDeflateWorker,\n DeflateWorkerStatus,\n getDeflateWorkerStatus,\n DeflateEncoderStreamId\n} from '../domain/deflate'\nvar RecorderStatus = {\n // The recorder is stopped.\n Stopped: 0,\n // The user started the recording while it wasn't possible yet. The recorder should start as soon\n // as possible.\n IntentToStart: 1,\n // The recorder is starting. It does not record anything yet.\n Starting: 2,\n // The recorder is started, it records the session.\n Started: 3\n}\n\nexport function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {\n if (\n (canUseEventBridge() && !bridgeSupports(BridgeCapability.RECORDS)) ||\n !isBrowserSupported()\n ) {\n return {\n start: noop,\n stop: noop,\n takeSubsequentFullSnapshot: noop,\n snapshotCanvas: function () {\n return {\n ok: false,\n reason: 'not_recording'\n }\n },\n getSerializedNodeIdForDebug: function () {\n return undefined\n },\n getLastAutoCanvasSnapshotResultForDebug: function () {\n return undefined\n },\n getAutoCanvasSnapshotDebugHistoryForDebug: function () {\n return undefined\n },\n getLastCanvasMutationForDebug: function () {\n return undefined\n },\n getCanvasMutationHistoryForDebug: function () {\n return undefined\n },\n getLastReplaySegmentFlushForDebug: function () {\n return undefined\n },\n getReplaySegmentFlushHistoryForDebug: function () {\n return undefined\n },\n getReplayPerformanceForDebug: function () {\n return undefined\n },\n getReplayStats: function () {\n return undefined\n },\n onRumStart: noop,\n isRecording: function () {\n return false\n }\n }\n }\n\n var state = {\n status: RecorderStatus.Stopped\n }\n\n var startStrategy = function () {\n state = { status: RecorderStatus.IntentToStart }\n }\n var stopStrategy = function () {\n state = { status: RecorderStatus.Stopped }\n }\n var takeSubsequentFullSnapshot = function () {}\n var snapshotCanvas = function () {\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n var getSerializedNodeIdForDebug = function () {\n return undefined\n }\n var getLastAutoCanvasSnapshotResultForDebug = function () {\n return undefined\n }\n var getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n return undefined\n }\n var getLastCanvasMutationForDebug = function () {\n return undefined\n }\n var getCanvasMutationHistoryForDebug = function () {\n return undefined\n }\n var getLastReplaySegmentFlushForDebug = function () {\n return undefined\n }\n var getReplaySegmentFlushHistoryForDebug = function () {\n return undefined\n }\n var getReplayPerformanceForDebug = function () {\n return undefined\n }\n return {\n start: function (options) {\n startStrategy(options)\n },\n stop: function () {\n stopStrategy()\n },\n\n onRumStart: function (\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n worker\n ) {\n lifeCycle.subscribe(LifeCycleEventType.SESSION_EXPIRED, function () {\n if (\n state.status === RecorderStatus.Starting ||\n state.status === RecorderStatus.Started\n ) {\n stopStrategy()\n state = { status: RecorderStatus.IntentToStart }\n }\n })\n lifeCycle.subscribe(\n LifeCycleEventType.PAGE_EXITED,\n function (pageExitEvent) {\n if (pageExitEvent.reason === PageExitReason.UNLOADING) {\n stopStrategy()\n }\n }\n )\n lifeCycle.subscribe(LifeCycleEventType.SESSION_RENEWED, function () {\n if (state.status === RecorderStatus.IntentToStart) {\n startStrategy()\n }\n })\n var cachedDeflateEncoder\n function getOrCreateDeflateEncoder() {\n if (!cachedDeflateEncoder) {\n if (!worker) {\n worker = startDeflateWorker(\n configuration,\n 'Session Replay',\n function () {\n stopStrategy()\n },\n createDeflateWorkerImpl\n )\n }\n if (worker) {\n cachedDeflateEncoder = createDeflateEncoder(\n worker,\n DeflateEncoderStreamId.REPLAY\n )\n }\n }\n return cachedDeflateEncoder\n }\n startStrategy = function (options) {\n var session = sessionManager.findTrackedSession()\n if (!session || !session.sessionReplayAllowed) {\n state = { status: RecorderStatus.IntentToStart }\n return\n }\n\n if (\n state.status === RecorderStatus.Starting ||\n state.status === RecorderStatus.Started\n ) {\n return\n }\n\n state = { status: RecorderStatus.Starting }\n\n runOnReadyState('interactive', function () {\n if (state.status !== RecorderStatus.Starting) {\n return\n }\n var deflateEncoder = getOrCreateDeflateEncoder()\n if (!deflateEncoder) {\n state = {\n status: RecorderStatus.Stopped\n }\n return\n }\n var recordingImpl = startRecordingImpl(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n deflateEncoder\n )\n state = {\n status: RecorderStatus.Started,\n stopRecording: recordingImpl.stop,\n takeSubsequentFullSnapshot: recordingImpl.takeSubsequentFullSnapshot,\n snapshotCanvas: recordingImpl.snapshotCanvas || noop,\n getSerializedNodeIdForDebug:\n recordingImpl.getSerializedNodeIdForDebug || noop,\n getLastAutoCanvasSnapshotResultForDebug:\n recordingImpl.getLastAutoCanvasSnapshotResultForDebug || noop,\n getAutoCanvasSnapshotDebugHistoryForDebug:\n recordingImpl.getAutoCanvasSnapshotDebugHistoryForDebug || noop,\n getLastCanvasMutationForDebug:\n recordingImpl.getLastCanvasMutationForDebug || noop,\n getCanvasMutationHistoryForDebug:\n recordingImpl.getCanvasMutationHistoryForDebug || noop,\n getLastReplaySegmentFlushForDebug:\n recordingImpl.getLastReplaySegmentFlushForDebug || noop,\n getReplaySegmentFlushHistoryForDebug:\n recordingImpl.getReplaySegmentFlushHistoryForDebug || noop,\n getReplayPerformanceForDebug:\n recordingImpl.getReplayPerformanceForDebug || noop\n }\n })\n }\n\n stopStrategy = function () {\n if (state.status === RecorderStatus.Stopped) {\n return\n }\n\n if (state.status === RecorderStatus.Started) {\n state.stopRecording()\n }\n\n state = {\n status: RecorderStatus.Stopped\n }\n }\n takeSubsequentFullSnapshot = function () {\n state.takeSubsequentFullSnapshot()\n }\n snapshotCanvas = function (canvas, options) {\n if (state.status === RecorderStatus.Started) {\n return state.snapshotCanvas(canvas, options)\n }\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n getSerializedNodeIdForDebug = function (node) {\n if (state.status === RecorderStatus.Started) {\n return state.getSerializedNodeIdForDebug(node)\n }\n return undefined\n }\n getLastAutoCanvasSnapshotResultForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastAutoCanvasSnapshotResultForDebug()\n }\n return undefined\n }\n getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getAutoCanvasSnapshotDebugHistoryForDebug()\n }\n return undefined\n }\n getLastCanvasMutationForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastCanvasMutationForDebug()\n }\n return undefined\n }\n getCanvasMutationHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getCanvasMutationHistoryForDebug()\n }\n return undefined\n }\n getLastReplaySegmentFlushForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastReplaySegmentFlushForDebug()\n }\n return undefined\n }\n getReplaySegmentFlushHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getReplaySegmentFlushHistoryForDebug()\n }\n return undefined\n }\n getReplayPerformanceForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getReplayPerformanceForDebug()\n }\n return undefined\n }\n if (state.status === RecorderStatus.IntentToStart) {\n startStrategy()\n }\n },\n takeSubsequentFullSnapshot() {\n takeSubsequentFullSnapshot()\n },\n snapshotCanvas: function (canvas, options) {\n return snapshotCanvas(canvas, options)\n },\n getSerializedNodeIdForDebug: function (node) {\n return getSerializedNodeIdForDebug(node)\n },\n getLastReplaySegmentFlushForDebug: function () {\n return getLastReplaySegmentFlushForDebug()\n },\n getLastAutoCanvasSnapshotResultForDebug: function () {\n return getLastAutoCanvasSnapshotResultForDebug()\n },\n getAutoCanvasSnapshotDebugHistoryForDebug: function () {\n return getAutoCanvasSnapshotDebugHistoryForDebug()\n },\n getLastCanvasMutationForDebug: function () {\n return getLastCanvasMutationForDebug()\n },\n getCanvasMutationHistoryForDebug: function () {\n return getCanvasMutationHistoryForDebug()\n },\n getReplaySegmentFlushHistoryForDebug: function () {\n return getReplaySegmentFlushHistoryForDebug()\n },\n getReplayPerformanceForDebug: function () {\n return getReplayPerformanceForDebug()\n },\n isRecording: function () {\n return (\n getDeflateWorkerStatus() === DeflateWorkerStatus.Initialized &&\n state.status === RecorderStatus.Started\n )\n },\n getReplayStats: function (viewId) {\n return getDeflateWorkerStatus() === DeflateWorkerStatus.Initialized\n ? getReplayStatsImpl(viewId)\n : undefined\n }\n }\n}\n\n/**\n * Test for Browser features used while recording\n */\nfunction isBrowserSupported() {\n return (\n // Array.from is a bit less supported by browsers than CSSSupportsRule, but has higher chances\n // to be polyfilled. Test for both to be more confident. We could add more things if we find out\n // this test is not sufficient.\n typeof Array.from === 'function' &&\n typeof CSSSupportsRule === 'function' &&\n typeof URL.createObjectURL === 'function' &&\n 'forEach' in NodeList.prototype\n )\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAUA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAIG,cAAc,GAAG;EACnB;EACAC,OAAO,EAAE,CAAC;EACV;EACA;EACAC,aAAa,EAAE,CAAC;EAChB;EACAC,QAAQ,EAAE,CAAC;EACX;EACAC,OAAO,EAAE;AACX,CAAC;AAEM,SAASC,eAA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CAAC;IAC3C,CAAC;IACDE,oCAAoC,EAAE,SAAtCA,oCAAoCA,CAAA,EAAc;MAChD,OAAOA,qCAAoC,CAAC,CAAC;IAC/C,CAAC;IACDC,4BAA4B,EAAE,SAA9BA,4BAA4BA,CAAA,EAAc;MACxC,OAAOA,6BAA4B,CAAC,CAAC;IACvC,CAAC;IACDG,WAAW,EAAE,SAAbA,WAAWA,CAAA,EAAc;MACvB,OACE,IAAAkC,+BAAsB,EAAC,CAAC,KAAKC,4BAAmB,CAACC,WAAW,IAC5DnC,KAAK,CAACC,MAAM,KAAKjC,cAAc,CAACI,OAAO;IAE3C,CAAC;IACDyB,cAAc,EAAE,SAAhBA,cAAcA,CAAYuC,MAAM,EAAE;MAChC,OAAO,IAAAH,+BAAsB,EAAC,CAAC,KAAKC,4BAAmB,CAACC,WAAW,GAC/D,IAAAE,2BAAkB,EAACD,MAAM,CAAC,GAC1B/C,SAAS;IACf;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA,SAAST,kBAAkBA,CAAA,EAAG;EAC5B;IACE;IACA;IACA;IACA,OAAO0D,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOC,eAAe,KAAK,UAAU,IACrC,OAAOC,GAAG,CAACC,eAAe,KAAK,UAAU,IACzC,SAAS,IAAIC,QAAQ,CAACC;EAAS;AAEnC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"recorderApi.js","names":["_browserCore","require","_replayStats","_deflate","RecorderStatus","Stopped","IntentToStart","Starting","Started","makeRecorderApi","startRecordingImpl","createDeflateWorkerImpl","canUseEventBridge","bridgeSupports","BridgeCapability","RECORDS","isBrowserSupported","start","noop","stop","takeSubsequentFullSnapshot","snapshotCanvas","ok","reason","getSerializedNodeIdForDebug","undefined","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","getReplayPerformanceForDebug","flushReplayMutationsForDebug","getReplayStats","onRumStart","isRecording","state","status","startStrategy","stopStrategy","options","lifeCycle","configuration","sessionManager","viewContexts","worker","subscribe","LifeCycleEventType","SESSION_EXPIRED","PAGE_EXITED","pageExitEvent","PageExitReason","UNLOADING","SESSION_RENEWED","cachedDeflateEncoder","getOrCreateDeflateEncoder","startDeflateWorker","createDeflateEncoder","DeflateEncoderStreamId","REPLAY","session","findTrackedSession","sessionReplayAllowed","runOnReadyState","deflateEncoder","recordingImpl","stopRecording","canvas","node","getDeflateWorkerStatus","DeflateWorkerStatus","Initialized","viewId","getReplayStatsImpl","Array","from","CSSSupportsRule","URL","createObjectURL","NodeList","prototype"],"sources":["../../src/boot/recorderApi.js"],"sourcesContent":["import {\n noop,\n runOnReadyState,\n LifeCycleEventType,\n canUseEventBridge,\n bridgeSupports,\n BridgeCapability,\n PageExitReason\n} from '@cloudcare/browser-core'\n\nimport { getReplayStats as getReplayStatsImpl } from '../domain/replay/replayStats'\nimport {\n createDeflateEncoder,\n startDeflateWorker,\n DeflateWorkerStatus,\n getDeflateWorkerStatus,\n DeflateEncoderStreamId\n} from '../domain/deflate'\nvar RecorderStatus = {\n // The recorder is stopped.\n Stopped: 0,\n // The user started the recording while it wasn't possible yet. The recorder should start as soon\n // as possible.\n IntentToStart: 1,\n // The recorder is starting. It does not record anything yet.\n Starting: 2,\n // The recorder is started, it records the session.\n Started: 3\n}\n\nexport function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {\n if (\n (canUseEventBridge() && !bridgeSupports(BridgeCapability.RECORDS)) ||\n !isBrowserSupported()\n ) {\n return {\n start: noop,\n stop: noop,\n takeSubsequentFullSnapshot: noop,\n snapshotCanvas: function () {\n return {\n ok: false,\n reason: 'not_recording'\n }\n },\n getSerializedNodeIdForDebug: function () {\n return undefined\n },\n getLastAutoCanvasSnapshotResultForDebug: function () {\n return undefined\n },\n getAutoCanvasSnapshotDebugHistoryForDebug: function () {\n return undefined\n },\n getLastCanvasMutationForDebug: function () {\n return undefined\n },\n getCanvasMutationHistoryForDebug: function () {\n return undefined\n },\n getLastDomMutationForDebug: function () {\n return undefined\n },\n getDomMutationHistoryForDebug: function () {\n return undefined\n },\n getLastReplaySegmentFlushForDebug: function () {\n return undefined\n },\n getReplaySegmentFlushHistoryForDebug: function () {\n return undefined\n },\n getReplayPerformanceForDebug: function () {\n return undefined\n },\n flushReplayMutationsForDebug: noop,\n getReplayStats: function () {\n return undefined\n },\n onRumStart: noop,\n isRecording: function () {\n return false\n }\n }\n }\n\n var state = {\n status: RecorderStatus.Stopped\n }\n\n var startStrategy = function () {\n state = { status: RecorderStatus.IntentToStart }\n }\n var stopStrategy = function () {\n state = { status: RecorderStatus.Stopped }\n }\n var takeSubsequentFullSnapshot = function () {}\n var snapshotCanvas = function () {\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n var getSerializedNodeIdForDebug = function () {\n return undefined\n }\n var getLastAutoCanvasSnapshotResultForDebug = function () {\n return undefined\n }\n var getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n return undefined\n }\n var getLastCanvasMutationForDebug = function () {\n return undefined\n }\n var getCanvasMutationHistoryForDebug = function () {\n return undefined\n }\n var getLastDomMutationForDebug = function () {\n return undefined\n }\n var getDomMutationHistoryForDebug = function () {\n return undefined\n }\n var getLastReplaySegmentFlushForDebug = function () {\n return undefined\n }\n var getReplaySegmentFlushHistoryForDebug = function () {\n return undefined\n }\n var getReplayPerformanceForDebug = function () {\n return undefined\n }\n var flushReplayMutationsForDebug = noop\n return {\n start: function (options) {\n startStrategy(options)\n },\n stop: function () {\n stopStrategy()\n },\n\n onRumStart: function (\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n worker\n ) {\n lifeCycle.subscribe(LifeCycleEventType.SESSION_EXPIRED, function () {\n if (\n state.status === RecorderStatus.Starting ||\n state.status === RecorderStatus.Started\n ) {\n stopStrategy()\n state = { status: RecorderStatus.IntentToStart }\n }\n })\n lifeCycle.subscribe(\n LifeCycleEventType.PAGE_EXITED,\n function (pageExitEvent) {\n if (pageExitEvent.reason === PageExitReason.UNLOADING) {\n stopStrategy()\n }\n }\n )\n lifeCycle.subscribe(LifeCycleEventType.SESSION_RENEWED, function () {\n if (state.status === RecorderStatus.IntentToStart) {\n startStrategy()\n }\n })\n var cachedDeflateEncoder\n function getOrCreateDeflateEncoder() {\n if (!cachedDeflateEncoder) {\n if (!worker) {\n worker = startDeflateWorker(\n configuration,\n 'Session Replay',\n function () {\n stopStrategy()\n },\n createDeflateWorkerImpl\n )\n }\n if (worker) {\n cachedDeflateEncoder = createDeflateEncoder(\n worker,\n DeflateEncoderStreamId.REPLAY\n )\n }\n }\n return cachedDeflateEncoder\n }\n startStrategy = function (options) {\n var session = sessionManager.findTrackedSession()\n if (!session || !session.sessionReplayAllowed) {\n state = { status: RecorderStatus.IntentToStart }\n return\n }\n\n if (\n state.status === RecorderStatus.Starting ||\n state.status === RecorderStatus.Started\n ) {\n return\n }\n\n state = { status: RecorderStatus.Starting }\n\n runOnReadyState('interactive', function () {\n if (state.status !== RecorderStatus.Starting) {\n return\n }\n var deflateEncoder = getOrCreateDeflateEncoder()\n if (!deflateEncoder) {\n state = {\n status: RecorderStatus.Stopped\n }\n return\n }\n var recordingImpl = startRecordingImpl(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n deflateEncoder\n )\n state = {\n status: RecorderStatus.Started,\n stopRecording: recordingImpl.stop,\n takeSubsequentFullSnapshot: recordingImpl.takeSubsequentFullSnapshot,\n snapshotCanvas: recordingImpl.snapshotCanvas || noop,\n getSerializedNodeIdForDebug:\n recordingImpl.getSerializedNodeIdForDebug || noop,\n getLastAutoCanvasSnapshotResultForDebug:\n recordingImpl.getLastAutoCanvasSnapshotResultForDebug || noop,\n getAutoCanvasSnapshotDebugHistoryForDebug:\n recordingImpl.getAutoCanvasSnapshotDebugHistoryForDebug || noop,\n getLastCanvasMutationForDebug:\n recordingImpl.getLastCanvasMutationForDebug || noop,\n getCanvasMutationHistoryForDebug:\n recordingImpl.getCanvasMutationHistoryForDebug || noop,\n getLastDomMutationForDebug:\n recordingImpl.getLastDomMutationForDebug || noop,\n getDomMutationHistoryForDebug:\n recordingImpl.getDomMutationHistoryForDebug || noop,\n getLastReplaySegmentFlushForDebug:\n recordingImpl.getLastReplaySegmentFlushForDebug || noop,\n getReplaySegmentFlushHistoryForDebug:\n recordingImpl.getReplaySegmentFlushHistoryForDebug || noop,\n getReplayPerformanceForDebug:\n recordingImpl.getReplayPerformanceForDebug || noop,\n flushReplayMutationsForDebug:\n recordingImpl.flushReplayMutationsForDebug || noop\n }\n })\n }\n\n stopStrategy = function () {\n if (state.status === RecorderStatus.Stopped) {\n return\n }\n\n if (state.status === RecorderStatus.Started) {\n state.stopRecording()\n }\n\n state = {\n status: RecorderStatus.Stopped\n }\n }\n takeSubsequentFullSnapshot = function () {\n state.takeSubsequentFullSnapshot()\n }\n snapshotCanvas = function (canvas, options) {\n if (state.status === RecorderStatus.Started) {\n return state.snapshotCanvas(canvas, options)\n }\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n getSerializedNodeIdForDebug = function (node) {\n if (state.status === RecorderStatus.Started) {\n return state.getSerializedNodeIdForDebug(node)\n }\n return undefined\n }\n getLastAutoCanvasSnapshotResultForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastAutoCanvasSnapshotResultForDebug()\n }\n return undefined\n }\n getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getAutoCanvasSnapshotDebugHistoryForDebug()\n }\n return undefined\n }\n getLastCanvasMutationForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastCanvasMutationForDebug()\n }\n return undefined\n }\n getCanvasMutationHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getCanvasMutationHistoryForDebug()\n }\n return undefined\n }\n getLastDomMutationForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastDomMutationForDebug()\n }\n return undefined\n }\n getDomMutationHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getDomMutationHistoryForDebug()\n }\n return undefined\n }\n getLastReplaySegmentFlushForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastReplaySegmentFlushForDebug()\n }\n return undefined\n }\n getReplaySegmentFlushHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getReplaySegmentFlushHistoryForDebug()\n }\n return undefined\n }\n getReplayPerformanceForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getReplayPerformanceForDebug()\n }\n return undefined\n }\n flushReplayMutationsForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n state.flushReplayMutationsForDebug()\n }\n }\n if (state.status === RecorderStatus.IntentToStart) {\n startStrategy()\n }\n },\n takeSubsequentFullSnapshot() {\n takeSubsequentFullSnapshot()\n },\n snapshotCanvas: function (canvas, options) {\n return snapshotCanvas(canvas, options)\n },\n getSerializedNodeIdForDebug: function (node) {\n return getSerializedNodeIdForDebug(node)\n },\n getLastReplaySegmentFlushForDebug: function () {\n return getLastReplaySegmentFlushForDebug()\n },\n getLastAutoCanvasSnapshotResultForDebug: function () {\n return getLastAutoCanvasSnapshotResultForDebug()\n },\n getAutoCanvasSnapshotDebugHistoryForDebug: function () {\n return getAutoCanvasSnapshotDebugHistoryForDebug()\n },\n getLastCanvasMutationForDebug: function () {\n return getLastCanvasMutationForDebug()\n },\n getCanvasMutationHistoryForDebug: function () {\n return getCanvasMutationHistoryForDebug()\n },\n getLastDomMutationForDebug: function () {\n return getLastDomMutationForDebug()\n },\n getDomMutationHistoryForDebug: function () {\n return getDomMutationHistoryForDebug()\n },\n getReplaySegmentFlushHistoryForDebug: function () {\n return getReplaySegmentFlushHistoryForDebug()\n },\n getReplayPerformanceForDebug: function () {\n return getReplayPerformanceForDebug()\n },\n flushReplayMutationsForDebug: function () {\n flushReplayMutationsForDebug()\n },\n isRecording: function () {\n return (\n getDeflateWorkerStatus() === DeflateWorkerStatus.Initialized &&\n state.status === RecorderStatus.Started\n )\n },\n getReplayStats: function (viewId) {\n return getDeflateWorkerStatus() === DeflateWorkerStatus.Initialized\n ? getReplayStatsImpl(viewId)\n : undefined\n }\n }\n}\n\n/**\n * Test for Browser features used while recording\n */\nfunction isBrowserSupported() {\n return (\n // Array.from is a bit less supported by browsers than CSSSupportsRule, but has higher chances\n // to be polyfilled. Test for both to be more confident. We could add more things if we find out\n // this test is not sufficient.\n typeof Array.from === 'function' &&\n typeof CSSSupportsRule === 'function' &&\n typeof URL.createObjectURL === 'function' &&\n 'forEach' in NodeList.prototype\n )\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAUA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAIG,cAAc,GAAG;EACnB;EACAC,OAAO,EAAE,CAAC;EACV;EACA;EACAC,aAAa,EAAE,CAAC;EAChB;EACAC,QAAQ,EAAE,CAAC;EACX;EACAC,OAAO,EAAE;AACX,CAAC;AAEM,SAASC,eAAeA,CAACC,kBAAkB,EAAEC,uBAAuB,EAAE;EAC3E,IACG,IAAAC,8BAAiB,EAAC,CAAC,IAAI,CAAC,IAAAC,2BAAc,EAACC,6BAAgB,CAACC,OAAO,CAAC,IACjE,CAACC,kBAAkB,CAAC,CAAC,EACrB;IACA,OAAO;MACLC,KAAK,EAAEC,iBAAI;MACXC,IAAI,EAAED,iBAAI;MACVE,0BAA0B,EAAEF,iBAAI;MAChCG,cAAc,EAAE,SAAhBA,cAAcA,CAAA,EAAc;QAC1B,OAAO;UACLC,EAAE,EAAE,KAAK;UACTC,MAAM,EAAE;QACV,CAAC;MACH,CAAC;MACDC,2BAA2B,EAAE,SAA7BA,2BAA2BA,CAAA,EAAc;QACvC,OAAOC,SAAS;MAClB,CAAC;MACDC,uCAAuC,EAAE,SAAzCA,uCAAuCA,CAAA,EAAc;QACnD,OA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B,CAACC,WAAW,IAC5DnC,KAAK,CAACC,MAAM,KAAKpC,cAAc,CAACI,OAAO;IAE3C,CAAC;IACD4B,cAAc,EAAE,SAAhBA,cAAcA,CAAYuC,MAAM,EAAE;MAChC,OAAO,IAAAH,+BAAsB,EAAC,CAAC,KAAKC,4BAAmB,CAACC,WAAW,GAC/D,IAAAE,2BAAkB,EAACD,MAAM,CAAC,GAC1BlD,SAAS;IACf;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA,SAAST,kBAAkBA,CAAA,EAAG;EAC5B;IACE;IACA;IACA;IACA,OAAO6D,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOC,eAAe,KAAK,UAAU,IACrC,OAAOC,GAAG,CAACC,eAAe,KAAK,UAAU,IACzC,SAAS,IAAIC,QAAQ,CAACC;EAAS;AAEnC","ignoreList":[]}
|
package/cjs/boot/rumPublicApi.js
CHANGED
|
@@ -282,6 +282,12 @@ function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
282
282
|
getCanvasMutationHistoryForDebug: (0, _browserCore.monitor)(function () {
|
|
283
283
|
return recorderApi.getCanvasMutationHistoryForDebug();
|
|
284
284
|
}),
|
|
285
|
+
getLastDomMutationForDebug: (0, _browserCore.monitor)(function () {
|
|
286
|
+
return recorderApi.getLastDomMutationForDebug();
|
|
287
|
+
}),
|
|
288
|
+
getDomMutationHistoryForDebug: (0, _browserCore.monitor)(function () {
|
|
289
|
+
return recorderApi.getDomMutationHistoryForDebug();
|
|
290
|
+
}),
|
|
285
291
|
getLastReplaySegmentFlushForDebug: (0, _browserCore.monitor)(function () {
|
|
286
292
|
return recorderApi.getLastReplaySegmentFlushForDebug();
|
|
287
293
|
}),
|
|
@@ -291,6 +297,11 @@ function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
291
297
|
getReplayPerformanceForDebug: (0, _browserCore.monitor)(function () {
|
|
292
298
|
return recorderApi.getReplayPerformanceForDebug();
|
|
293
299
|
}),
|
|
300
|
+
flushReplayMutationsForDebug: (0, _browserCore.monitor)(function () {
|
|
301
|
+
if (recorderApi.flushReplayMutationsForDebug) {
|
|
302
|
+
recorderApi.flushReplayMutationsForDebug();
|
|
303
|
+
}
|
|
304
|
+
}),
|
|
294
305
|
createResourceTrackerId: (0, _browserCore.monitor)(function () {
|
|
295
306
|
return resourceTrackerManager.createTrackerId();
|
|
296
307
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rumPublicApi.js","names":["_browserCore","require","_commonContext","_perStartRum","_resourceTrackerManager","_typeof","o","Symbol","iterator","constructor","prototype","RUM_STORAGE_KEY","makeRumPublicApi","startRumImpl","recorderApi","options","undefined","customerDataTrackerManager","createCustomerDataTrackerManager","CustomerDataCompressionStatus","Unknown","resourceTrackerManager","createResourceTrackerManager","globalContextManager","createContextManager","customerDataTracker","getOrCreateTracker","CustomerDataType","GlobalContext","userContextManager","User","propertiesConfig","id","type","name","email","getCommonContext","buildCommonContext","strategy","createPreStartStrategy","assign","configuration","deflateWorker","initialViewOptions","storeContextsToLocal","storeContextManager","setCompressionStatus","Enabled","Disabled","startRumResult","createDeflateEncoder","streamId","createIdentityEncoder","onRumStart","lifeCycle","session","viewContexts","createPostStartStrategy","startView","monitor","sanitizedOptions","context","View","updateCustomerData","addTelemetryUsage","feature","rumPublicApi","makePublicApi","init","initConfiguration","setViewName","setViewContext","setViewContextProperty","key","value","getViewContext","addRumGlobalContext","setContextProperty","setGlobalContextProperty","removeRumGlobalContext","removeContextProperty","removeGlobalContextProperty","getRumGlobalContext","getContext","getGlobalContext","setRumGlobalContext","setContext","setGlobalContext","clearGlobalContext","clearContext","getInitConfiguration","deepClone","getRemoteConfiguration","callback","getInternalContext","startTime","addDebugSession","clearDebugSession","getDebugSession","addResource","handlingStack","createHandlingStack","callMonitored","sanitize","startClocks","clocksNow","ResourceType","CUSTOM","addTypeAction","sourceType","addAction","getType","ActionType","addError","error","addTiming","time","setUser","newUser","checkUser","sanitizeUser","getUser","setUserProperty","property","sanitizedProperty","removeUserProperty","removeUser","clearUser","stopSession","setForcedSession","startSessionReplayRecording","start","force","isRecording","stopSessionReplayRecording","stop","takeSubsequentFullSnapshot","snapshotCanvas","canvas","getSerializedNodeIdForDebug","node","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","getReplayPerformanceForDebug","createResourceTrackerId","createTrackerId","setResourceContext","trackerId","appendResourceContext","finishResource","getResource","preStartStrategy","displayAlreadyInitializedError"],"sources":["../../src/boot/rumPublicApi.js"],"sourcesContent":["import {\n makePublicApi,\n createContextManager,\n CustomerDataType,\n clocksNow,\n ActionType,\n ResourceType,\n deepClone,\n createHandlingStack,\n sanitizeUser,\n checkUser,\n callMonitored,\n assign,\n monitor,\n storeContextManager,\n createIdentityEncoder,\n addTelemetryUsage,\n sanitize,\n createCustomerDataTrackerManager,\n CustomerDataCompressionStatus,\n displayAlreadyInitializedError,\n getType\n} from '@cloudcare/browser-core'\nimport { buildCommonContext } from '../domain/contexts/commonContext'\nimport { createPreStartStrategy } from './perStartRum'\nimport { createResourceTrackerManager } from '../domain/rumEventsCollection/resource/resourceTrackerManager'\nvar RUM_STORAGE_KEY = 'rum'\nexport function makeRumPublicApi(startRumImpl, recorderApi, options) {\n if (options === undefined) {\n options = {}\n }\n const customerDataTrackerManager = createCustomerDataTrackerManager(\n CustomerDataCompressionStatus.Unknown\n )\n const resourceTrackerManager = createResourceTrackerManager()\n const globalContextManager = createContextManager('global', {\n customerDataTracker: customerDataTrackerManager.getOrCreateTracker(\n CustomerDataType.GlobalContext\n )\n })\n const userContextManager = createContextManager('user', {\n customerDataTracker: customerDataTrackerManager.getOrCreateTracker(\n CustomerDataType.User\n ),\n propertiesConfig: {\n id: { type: 'string' },\n name: { type: 'string' },\n email: { type: 'string' }\n }\n })\n function getCommonContext() {\n return buildCommonContext(\n globalContextManager,\n userContextManager,\n recorderApi\n )\n }\n let strategy = createPreStartStrategy(\n assign({}, options, {\n resourceTrackerManager: resourceTrackerManager\n }),\n getCommonContext,\n function (configuration, deflateWorker, initialViewOptions) {\n if (configuration.storeContextsToLocal) {\n storeContextManager(\n configuration,\n globalContextManager,\n RUM_STORAGE_KEY,\n CustomerDataType.GlobalContext\n )\n storeContextManager(\n configuration,\n userContextManager,\n RUM_STORAGE_KEY,\n CustomerDataType.User\n )\n }\n customerDataTrackerManager.setCompressionStatus(\n deflateWorker\n ? CustomerDataCompressionStatus.Enabled\n : CustomerDataCompressionStatus.Disabled\n )\n var startRumResult = startRumImpl(\n configuration,\n recorderApi,\n customerDataTrackerManager,\n getCommonContext,\n initialViewOptions,\n deflateWorker && options.createDeflateEncoder\n ? function (streamId) {\n return options.createDeflateEncoder(deflateWorker, streamId)\n }\n : createIdentityEncoder,\n resourceTrackerManager\n )\n recorderApi.onRumStart(\n startRumResult.lifeCycle,\n configuration,\n startRumResult.session,\n startRumResult.viewContexts,\n deflateWorker\n )\n\n strategy = createPostStartStrategy(strategy, startRumResult)\n\n return startRumResult\n }\n )\n\n const startView = monitor(function (options) {\n const sanitizedOptions =\n typeof options === 'object' ? options : { name: options }\n strategy.startView(sanitizedOptions)\n if (sanitizedOptions.context) {\n customerDataTrackerManager\n .getOrCreateTracker(CustomerDataType.View)\n .updateCustomerData(sanitizedOptions.context)\n }\n addTelemetryUsage({ feature: 'start-view' })\n })\n\n var rumPublicApi = makePublicApi({\n init: monitor(function (initConfiguration) {\n strategy.init(initConfiguration)\n }),\n setViewName: monitor((name) => {\n strategy.setViewName(name)\n addTelemetryUsage({ feature: 'set-view-name' })\n }),\n\n setViewContext: monitor((context) => {\n strategy.setViewContext(context)\n addTelemetryUsage({ feature: 'set-view-context' })\n }),\n\n setViewContextProperty: monitor((key, value) => {\n strategy.setViewContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-view-context-property' })\n }),\n\n getViewContext: monitor(() => {\n addTelemetryUsage({ feature: 'set-view-context-property' })\n return strategy.getViewContext()\n }),\n /** @deprecated: use setGlobalContextProperty instead */\n addRumGlobalContext: monitor(function (key, value) {\n globalContextManager.setContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n setGlobalContextProperty: monitor(function (key, value) {\n globalContextManager.setContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n\n /** @deprecated: use removeGlobalContextProperty instead */\n removeRumGlobalContext: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n removeGlobalContextProperty: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n\n /** @deprecated: use getGlobalContext instead */\n getRumGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n getGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n\n /** @deprecated: use setGlobalContext instead */\n setRumGlobalContext: monitor(function (context) {\n globalContextManager.setContext(context)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n setGlobalContext: monitor(function (context) {\n globalContextManager.setContext(context)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n\n clearGlobalContext: monitor(function () {\n return globalContextManager.clearContext()\n }),\n\n getInitConfiguration: monitor(function () {\n return deepClone(strategy.initConfiguration)\n }),\n getRemoteConfiguration: monitor(function (callback) {\n return strategy.getRemoteConfiguration(callback)\n }),\n getInternalContext: monitor(function (startTime) {\n return strategy.getInternalContext(startTime)\n }),\n addDebugSession: monitor(function (id) {}),\n clearDebugSession: monitor(function () {}),\n getDebugSession: monitor(function () {}),\n addResource: monitor(function (context) {\n const handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addResource({\n context: sanitize(context),\n startClocks: clocksNow(),\n type: ResourceType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-resource' })\n })\n }),\n addTypeAction: monitor(function (name, type, context) {\n const handlingStack = createHandlingStack()\n\n callMonitored(function () {\n const sourceType = sanitize(type)\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type:\n getType(sourceType) === 'string' ? sourceType : ActionType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-type-action' })\n })\n }),\n addAction: monitor(function (name, context) {\n const handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type: ActionType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-action' })\n })\n }),\n addError: monitor(function (error, context) {\n var handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addError({\n error, // Do not sanitize error here, it is needed unserialized by computeRawError()\n handlingStack,\n context: sanitize(context),\n startClocks: clocksNow()\n })\n addTelemetryUsage({ feature: 'add-error' })\n })\n }),\n addTiming: monitor(function (name, time) {\n strategy.addTiming(sanitize(name), time)\n }),\n setUser: monitor(function (newUser) {\n if (checkUser(newUser)) {\n userContextManager.setContext(sanitizeUser(newUser))\n }\n addTelemetryUsage({ feature: 'set-user' })\n }),\n getUser: monitor(function () {\n return userContextManager.getContext()\n }),\n setUserProperty: monitor(function (key, property) {\n var newUser = {}\n newUser[key] = property\n var sanitizedProperty = sanitizeUser(newUser)[key]\n userContextManager.setContextProperty(key, sanitizedProperty)\n addTelemetryUsage({ feature: 'set-user' })\n }),\n removeUserProperty: monitor(function (key) {\n return userContextManager.removeContextProperty(key)\n }),\n\n /** @deprecated: renamed to clearUser */\n removeUser: monitor(function () {\n return userContextManager.clearContext()\n }),\n clearUser: monitor(function () {\n return userContextManager.clearContext()\n }),\n startView: startView,\n stopSession: monitor(function () {\n strategy.stopSession()\n addTelemetryUsage({ feature: 'stop-session' })\n }),\n setForcedSession: monitor(function () {\n strategy.setForcedSession()\n addTelemetryUsage({ feature: 'set-forced-session' })\n }),\n startSessionReplayRecording: monitor(function (options) {\n recorderApi.start(options)\n addTelemetryUsage({\n feature: 'start-session-replay-recording',\n force: options && options.force\n })\n }),\n isRecording: monitor(function () {\n return recorderApi.isRecording()\n }),\n stopSessionReplayRecording: monitor(recorderApi.stop),\n takeSubsequentFullSnapshot: monitor(recorderApi.takeSubsequentFullSnapshot),\n snapshotCanvas: monitor(function (canvas, options) {\n return recorderApi.snapshotCanvas(canvas, options)\n }),\n getSerializedNodeIdForDebug: monitor(function (node) {\n return recorderApi.getSerializedNodeIdForDebug(node)\n }),\n getLastAutoCanvasSnapshotResultForDebug: monitor(function () {\n return recorderApi.getLastAutoCanvasSnapshotResultForDebug()\n }),\n getAutoCanvasSnapshotDebugHistoryForDebug: monitor(function () {\n return recorderApi.getAutoCanvasSnapshotDebugHistoryForDebug()\n }),\n getLastCanvasMutationForDebug: monitor(function () {\n return recorderApi.getLastCanvasMutationForDebug()\n }),\n getCanvasMutationHistoryForDebug: monitor(function () {\n return recorderApi.getCanvasMutationHistoryForDebug()\n }),\n getLastReplaySegmentFlushForDebug: monitor(function () {\n return recorderApi.getLastReplaySegmentFlushForDebug()\n }),\n getReplaySegmentFlushHistoryForDebug: monitor(function () {\n return recorderApi.getReplaySegmentFlushHistoryForDebug()\n }),\n getReplayPerformanceForDebug: monitor(function () {\n return recorderApi.getReplayPerformanceForDebug()\n }),\n createResourceTrackerId: monitor(function () {\n return resourceTrackerManager.createTrackerId()\n }),\n setResourceContext: monitor(function (trackerId, context) {\n return resourceTrackerManager.setResourceContext(\n trackerId,\n sanitize(context)\n )\n }),\n appendResourceContext: monitor(function (trackerId, context) {\n return resourceTrackerManager.appendResourceContext(\n trackerId,\n sanitize(context)\n )\n }),\n finishResource: monitor(function (trackerId) {\n return resourceTrackerManager.finishResource(trackerId)\n }),\n getResource: monitor(function (trackerId) {\n return resourceTrackerManager.getResource(trackerId)\n })\n })\n return rumPublicApi\n}\nfunction createPostStartStrategy(preStartStrategy, startRumResult) {\n return assign(\n {\n init: function (initConfiguration) {\n displayAlreadyInitializedError('DATAFLUX_RUM', initConfiguration)\n },\n initConfiguration: preStartStrategy.getInitConfiguration(),\n getRemoteConfiguration: function (callback) {\n preStartStrategy.getRemoteConfiguration(callback)\n }\n },\n startRumResult\n )\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAuBA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAH,OAAA;AAA4G,SAAAI,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AAC5G,IAAIK,eAAe,GAAG,KAAK;AACpB,SAASC,gBAAgBA,CAACC,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAE;EACnE,IAAIA,OAAO,KAAKC,SAAS,EAAE;IACzBD,OAAO,GAAG,CAAC,CAAC;EACd;EACA,IAAME,0BAA0B,GAAG,IAAAC,6CAAgC,EACjEC,0CAA6B,CAACC,OAChC,CAAC;EACD,IAAMC,sBAAsB,GAAG,IAAAC,oDAA4B,EAAC,CAAC;EAC7D,IAAMC,oBAAoB,GAAG,IAAAC,iCAAoB,EAAC,QAAQ,EAAE;IAC1DC,mBAAmB,EAAER,0BAA0B,CAACS,kBAAkB,CAChEC,6BAAgB,CAACC,aACnB;EACF,CAAC,CAAC;EACF,IAAMC,kBAAkB,GAAG,IAAAL,iCAAoB,EAAC,MAAM,EAAE;IACtDC,mBAAmB,EAAER,0BAA0B,CAACS,kBAAkB,CAChEC,6BAAgB,CAACG,IACnB,CAAC;IACDC,gBAAgB,EAAE;MAChBC,EAAE,EAAE;QAAEC,IAAI,EAAE;MAAS,CAAC;MACtBC,IAAI,EAAE;QAAED,IAAI,EAAE;MAAS,CAAC;MACxBE,KAAK,EA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H,SAAS,CAAC;IACtD,CAAC;EACH,CAAC,CAAC;EACF,OAAOrF,YAAY;AACrB;AACA,SAAST,uBAAuBA,CAACkG,gBAAgB,EAAE1G,cAAc,EAAE;EACjE,OAAO,IAAAT,mBAAM,EACX;IACE4B,IAAI,EAAE,SAANA,IAAIA,CAAYC,iBAAiB,EAAE;MACjC,IAAAuF,2CAA8B,EAAC,cAAc,EAAEvF,iBAAiB,CAAC;IACnE,CAAC;IACDA,iBAAiB,EAAEsF,gBAAgB,CAACjE,oBAAoB,CAAC,CAAC;IAC1DE,sBAAsB,EAAE,SAAxBA,sBAAsBA,CAAYC,QAAQ,EAAE;MAC1C8D,gBAAgB,CAAC/D,sBAAsB,CAACC,QAAQ,CAAC;IACnD;EACF,CAAC,EACD5C,cACF,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"rumPublicApi.js","names":["_browserCore","require","_commonContext","_perStartRum","_resourceTrackerManager","_typeof","o","Symbol","iterator","constructor","prototype","RUM_STORAGE_KEY","makeRumPublicApi","startRumImpl","recorderApi","options","undefined","customerDataTrackerManager","createCustomerDataTrackerManager","CustomerDataCompressionStatus","Unknown","resourceTrackerManager","createResourceTrackerManager","globalContextManager","createContextManager","customerDataTracker","getOrCreateTracker","CustomerDataType","GlobalContext","userContextManager","User","propertiesConfig","id","type","name","email","getCommonContext","buildCommonContext","strategy","createPreStartStrategy","assign","configuration","deflateWorker","initialViewOptions","storeContextsToLocal","storeContextManager","setCompressionStatus","Enabled","Disabled","startRumResult","createDeflateEncoder","streamId","createIdentityEncoder","onRumStart","lifeCycle","session","viewContexts","createPostStartStrategy","startView","monitor","sanitizedOptions","context","View","updateCustomerData","addTelemetryUsage","feature","rumPublicApi","makePublicApi","init","initConfiguration","setViewName","setViewContext","setViewContextProperty","key","value","getViewContext","addRumGlobalContext","setContextProperty","setGlobalContextProperty","removeRumGlobalContext","removeContextProperty","removeGlobalContextProperty","getRumGlobalContext","getContext","getGlobalContext","setRumGlobalContext","setContext","setGlobalContext","clearGlobalContext","clearContext","getInitConfiguration","deepClone","getRemoteConfiguration","callback","getInternalContext","startTime","addDebugSession","clearDebugSession","getDebugSession","addResource","handlingStack","createHandlingStack","callMonitored","sanitize","startClocks","clocksNow","ResourceType","CUSTOM","addTypeAction","sourceType","addAction","getType","ActionType","addError","error","addTiming","time","setUser","newUser","checkUser","sanitizeUser","getUser","setUserProperty","property","sanitizedProperty","removeUserProperty","removeUser","clearUser","stopSession","setForcedSession","startSessionReplayRecording","start","force","isRecording","stopSessionReplayRecording","stop","takeSubsequentFullSnapshot","snapshotCanvas","canvas","getSerializedNodeIdForDebug","node","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","getReplayPerformanceForDebug","flushReplayMutationsForDebug","createResourceTrackerId","createTrackerId","setResourceContext","trackerId","appendResourceContext","finishResource","getResource","preStartStrategy","displayAlreadyInitializedError"],"sources":["../../src/boot/rumPublicApi.js"],"sourcesContent":["import {\n makePublicApi,\n createContextManager,\n CustomerDataType,\n clocksNow,\n ActionType,\n ResourceType,\n deepClone,\n createHandlingStack,\n sanitizeUser,\n checkUser,\n callMonitored,\n assign,\n monitor,\n storeContextManager,\n createIdentityEncoder,\n addTelemetryUsage,\n sanitize,\n createCustomerDataTrackerManager,\n CustomerDataCompressionStatus,\n displayAlreadyInitializedError,\n getType\n} from '@cloudcare/browser-core'\nimport { buildCommonContext } from '../domain/contexts/commonContext'\nimport { createPreStartStrategy } from './perStartRum'\nimport { createResourceTrackerManager } from '../domain/rumEventsCollection/resource/resourceTrackerManager'\nvar RUM_STORAGE_KEY = 'rum'\nexport function makeRumPublicApi(startRumImpl, recorderApi, options) {\n if (options === undefined) {\n options = {}\n }\n const customerDataTrackerManager = createCustomerDataTrackerManager(\n CustomerDataCompressionStatus.Unknown\n )\n const resourceTrackerManager = createResourceTrackerManager()\n const globalContextManager = createContextManager('global', {\n customerDataTracker: customerDataTrackerManager.getOrCreateTracker(\n CustomerDataType.GlobalContext\n )\n })\n const userContextManager = createContextManager('user', {\n customerDataTracker: customerDataTrackerManager.getOrCreateTracker(\n CustomerDataType.User\n ),\n propertiesConfig: {\n id: { type: 'string' },\n name: { type: 'string' },\n email: { type: 'string' }\n }\n })\n function getCommonContext() {\n return buildCommonContext(\n globalContextManager,\n userContextManager,\n recorderApi\n )\n }\n let strategy = createPreStartStrategy(\n assign({}, options, {\n resourceTrackerManager: resourceTrackerManager\n }),\n getCommonContext,\n function (configuration, deflateWorker, initialViewOptions) {\n if (configuration.storeContextsToLocal) {\n storeContextManager(\n configuration,\n globalContextManager,\n RUM_STORAGE_KEY,\n CustomerDataType.GlobalContext\n )\n storeContextManager(\n configuration,\n userContextManager,\n RUM_STORAGE_KEY,\n CustomerDataType.User\n )\n }\n customerDataTrackerManager.setCompressionStatus(\n deflateWorker\n ? CustomerDataCompressionStatus.Enabled\n : CustomerDataCompressionStatus.Disabled\n )\n var startRumResult = startRumImpl(\n configuration,\n recorderApi,\n customerDataTrackerManager,\n getCommonContext,\n initialViewOptions,\n deflateWorker && options.createDeflateEncoder\n ? function (streamId) {\n return options.createDeflateEncoder(deflateWorker, streamId)\n }\n : createIdentityEncoder,\n resourceTrackerManager\n )\n recorderApi.onRumStart(\n startRumResult.lifeCycle,\n configuration,\n startRumResult.session,\n startRumResult.viewContexts,\n deflateWorker\n )\n\n strategy = createPostStartStrategy(strategy, startRumResult)\n\n return startRumResult\n }\n )\n\n const startView = monitor(function (options) {\n const sanitizedOptions =\n typeof options === 'object' ? options : { name: options }\n strategy.startView(sanitizedOptions)\n if (sanitizedOptions.context) {\n customerDataTrackerManager\n .getOrCreateTracker(CustomerDataType.View)\n .updateCustomerData(sanitizedOptions.context)\n }\n addTelemetryUsage({ feature: 'start-view' })\n })\n\n var rumPublicApi = makePublicApi({\n init: monitor(function (initConfiguration) {\n strategy.init(initConfiguration)\n }),\n setViewName: monitor((name) => {\n strategy.setViewName(name)\n addTelemetryUsage({ feature: 'set-view-name' })\n }),\n\n setViewContext: monitor((context) => {\n strategy.setViewContext(context)\n addTelemetryUsage({ feature: 'set-view-context' })\n }),\n\n setViewContextProperty: monitor((key, value) => {\n strategy.setViewContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-view-context-property' })\n }),\n\n getViewContext: monitor(() => {\n addTelemetryUsage({ feature: 'set-view-context-property' })\n return strategy.getViewContext()\n }),\n /** @deprecated: use setGlobalContextProperty instead */\n addRumGlobalContext: monitor(function (key, value) {\n globalContextManager.setContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n setGlobalContextProperty: monitor(function (key, value) {\n globalContextManager.setContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n\n /** @deprecated: use removeGlobalContextProperty instead */\n removeRumGlobalContext: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n removeGlobalContextProperty: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n\n /** @deprecated: use getGlobalContext instead */\n getRumGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n getGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n\n /** @deprecated: use setGlobalContext instead */\n setRumGlobalContext: monitor(function (context) {\n globalContextManager.setContext(context)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n setGlobalContext: monitor(function (context) {\n globalContextManager.setContext(context)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n\n clearGlobalContext: monitor(function () {\n return globalContextManager.clearContext()\n }),\n\n getInitConfiguration: monitor(function () {\n return deepClone(strategy.initConfiguration)\n }),\n getRemoteConfiguration: monitor(function (callback) {\n return strategy.getRemoteConfiguration(callback)\n }),\n getInternalContext: monitor(function (startTime) {\n return strategy.getInternalContext(startTime)\n }),\n addDebugSession: monitor(function (id) {}),\n clearDebugSession: monitor(function () {}),\n getDebugSession: monitor(function () {}),\n addResource: monitor(function (context) {\n const handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addResource({\n context: sanitize(context),\n startClocks: clocksNow(),\n type: ResourceType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-resource' })\n })\n }),\n addTypeAction: monitor(function (name, type, context) {\n const handlingStack = createHandlingStack()\n\n callMonitored(function () {\n const sourceType = sanitize(type)\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type:\n getType(sourceType) === 'string' ? sourceType : ActionType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-type-action' })\n })\n }),\n addAction: monitor(function (name, context) {\n const handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type: ActionType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-action' })\n })\n }),\n addError: monitor(function (error, context) {\n var handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addError({\n error, // Do not sanitize error here, it is needed unserialized by computeRawError()\n handlingStack,\n context: sanitize(context),\n startClocks: clocksNow()\n })\n addTelemetryUsage({ feature: 'add-error' })\n })\n }),\n addTiming: monitor(function (name, time) {\n strategy.addTiming(sanitize(name), time)\n }),\n setUser: monitor(function (newUser) {\n if (checkUser(newUser)) {\n userContextManager.setContext(sanitizeUser(newUser))\n }\n addTelemetryUsage({ feature: 'set-user' })\n }),\n getUser: monitor(function () {\n return userContextManager.getContext()\n }),\n setUserProperty: monitor(function (key, property) {\n var newUser = {}\n newUser[key] = property\n var sanitizedProperty = sanitizeUser(newUser)[key]\n userContextManager.setContextProperty(key, sanitizedProperty)\n addTelemetryUsage({ feature: 'set-user' })\n }),\n removeUserProperty: monitor(function (key) {\n return userContextManager.removeContextProperty(key)\n }),\n\n /** @deprecated: renamed to clearUser */\n removeUser: monitor(function () {\n return userContextManager.clearContext()\n }),\n clearUser: monitor(function () {\n return userContextManager.clearContext()\n }),\n startView: startView,\n stopSession: monitor(function () {\n strategy.stopSession()\n addTelemetryUsage({ feature: 'stop-session' })\n }),\n setForcedSession: monitor(function () {\n strategy.setForcedSession()\n addTelemetryUsage({ feature: 'set-forced-session' })\n }),\n startSessionReplayRecording: monitor(function (options) {\n recorderApi.start(options)\n addTelemetryUsage({\n feature: 'start-session-replay-recording',\n force: options && options.force\n })\n }),\n isRecording: monitor(function () {\n return recorderApi.isRecording()\n }),\n stopSessionReplayRecording: monitor(recorderApi.stop),\n takeSubsequentFullSnapshot: monitor(recorderApi.takeSubsequentFullSnapshot),\n snapshotCanvas: monitor(function (canvas, options) {\n return recorderApi.snapshotCanvas(canvas, options)\n }),\n getSerializedNodeIdForDebug: monitor(function (node) {\n return recorderApi.getSerializedNodeIdForDebug(node)\n }),\n getLastAutoCanvasSnapshotResultForDebug: monitor(function () {\n return recorderApi.getLastAutoCanvasSnapshotResultForDebug()\n }),\n getAutoCanvasSnapshotDebugHistoryForDebug: monitor(function () {\n return recorderApi.getAutoCanvasSnapshotDebugHistoryForDebug()\n }),\n getLastCanvasMutationForDebug: monitor(function () {\n return recorderApi.getLastCanvasMutationForDebug()\n }),\n getCanvasMutationHistoryForDebug: monitor(function () {\n return recorderApi.getCanvasMutationHistoryForDebug()\n }),\n getLastDomMutationForDebug: monitor(function () {\n return recorderApi.getLastDomMutationForDebug()\n }),\n getDomMutationHistoryForDebug: monitor(function () {\n return recorderApi.getDomMutationHistoryForDebug()\n }),\n getLastReplaySegmentFlushForDebug: monitor(function () {\n return recorderApi.getLastReplaySegmentFlushForDebug()\n }),\n getReplaySegmentFlushHistoryForDebug: monitor(function () {\n return recorderApi.getReplaySegmentFlushHistoryForDebug()\n }),\n getReplayPerformanceForDebug: monitor(function () {\n return recorderApi.getReplayPerformanceForDebug()\n }),\n flushReplayMutationsForDebug: monitor(function () {\n if (recorderApi.flushReplayMutationsForDebug) {\n recorderApi.flushReplayMutationsForDebug()\n }\n }),\n createResourceTrackerId: monitor(function () {\n return resourceTrackerManager.createTrackerId()\n }),\n setResourceContext: monitor(function (trackerId, context) {\n return resourceTrackerManager.setResourceContext(\n trackerId,\n sanitize(context)\n )\n }),\n appendResourceContext: monitor(function (trackerId, context) {\n return resourceTrackerManager.appendResourceContext(\n trackerId,\n sanitize(context)\n )\n }),\n finishResource: monitor(function (trackerId) {\n return resourceTrackerManager.finishResource(trackerId)\n }),\n getResource: monitor(function (trackerId) {\n return resourceTrackerManager.getResource(trackerId)\n })\n })\n return rumPublicApi\n}\nfunction createPostStartStrategy(preStartStrategy, startRumResult) {\n return assign(\n {\n init: function (initConfiguration) {\n displayAlreadyInitializedError('DATAFLUX_RUM', initConfiguration)\n },\n initConfiguration: preStartStrategy.getInitConfiguration(),\n getRemoteConfiguration: function (callback) {\n preStartStrategy.getRemoteConfiguration(callback)\n }\n },\n startRumResult\n )\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAuBA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAH,OAAA;AAA4G,SAAAI,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AAC5G,IAAIK,eAAe,GAAG,KAAK;AACpB,SAASC,gBAAgBA,CAACC,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAE;EACnE,IAAIA,OAAO,KAAKC,SAAS,EAAE;IACzBD,OAAO,GAAG,CAAC,CAAC;EACd;EACA,IAAME,0BAA0B,GAAG,IAAAC,6CAAgC,EACjEC,0C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;IAC1DE,sBAAsB,EAAE,SAAxBA,sBAAsBA,CAAYC,QAAQ,EAAE;MAC1CiE,gBAAgB,CAAClE,sBAAsB,CAACC,QAAQ,CAAC;IACnD;EACF,CAAC,EACD5C,cACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -99,6 +99,8 @@ function startRecording(lifeCycle, configuration, sessionManager, viewContexts,
|
|
|
99
99
|
var getAutoCanvasSnapshotDebugHistoryForDebug = _record.getAutoCanvasSnapshotDebugHistoryForDebug;
|
|
100
100
|
var getLastCanvasMutationForDebug = _record.getLastCanvasMutationForDebug;
|
|
101
101
|
var getCanvasMutationHistoryForDebug = _record.getCanvasMutationHistoryForDebug;
|
|
102
|
+
var getLastDomMutationForDebug = _record.getLastDomMutationForDebug;
|
|
103
|
+
var getDomMutationHistoryForDebug = _record.getDomMutationHistoryForDebug;
|
|
102
104
|
var getReplayPerformanceForDebug = function getReplayPerformanceForDebug() {
|
|
103
105
|
return cloneReplayPerformanceForDebug(_record.getReplayPerformanceForDebug ? _record.getReplayPerformanceForDebug() : undefined, replaySegmentFlushCount);
|
|
104
106
|
};
|
|
@@ -136,9 +138,12 @@ function startRecording(lifeCycle, configuration, sessionManager, viewContexts,
|
|
|
136
138
|
getAutoCanvasSnapshotDebugHistoryForDebug: getAutoCanvasSnapshotDebugHistoryForDebug,
|
|
137
139
|
getLastCanvasMutationForDebug: getLastCanvasMutationForDebug,
|
|
138
140
|
getCanvasMutationHistoryForDebug: getCanvasMutationHistoryForDebug,
|
|
141
|
+
getLastDomMutationForDebug: getLastDomMutationForDebug,
|
|
142
|
+
getDomMutationHistoryForDebug: getDomMutationHistoryForDebug,
|
|
139
143
|
getLastReplaySegmentFlushForDebug: getLastReplaySegmentFlushForDebug,
|
|
140
144
|
getReplaySegmentFlushHistoryForDebug: getReplaySegmentFlushHistoryForDebug,
|
|
141
|
-
getReplayPerformanceForDebug: getReplayPerformanceForDebug
|
|
145
|
+
getReplayPerformanceForDebug: getReplayPerformanceForDebug,
|
|
146
|
+
flushReplayMutationsForDebug: flushMutations
|
|
142
147
|
};
|
|
143
148
|
}
|
|
144
149
|
function cloneReplaySegmentFlushForDebug(segmentFlush, sequence) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startRecording.js","names":["_browserCore","require","_record2","_startRecordBridge2","_segmentCollection","_types","_replayStats","BUFFER_CHECKOUT_TIME","exports","ONE_SECOND","REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT","startRecording","lifeCycle","configuration","sessionManager","viewContexts","encoder","httpRequest","cleanupTasks","lastReplaySegmentFlushForDebug","replaySegmentFlushHistoryForDebug","replaySegmentFlushCount","reportError","error","notify","LifeCycleEventType","RAW_ERROR_COLLECTED","addTelemetryDebug","message","replayRequest","createHttpRequest","sessionReplayEndPoint","SEGMENT_BYTES_LIMIT","retryMaxSize","addRecord","_record","canUseEventBridge","session","findTrackedSession","isRecordErrorSessionReplay","errorSessionReplayAllowed","sessionHasError","segmentCollection","startSegmentCollection","onSegmentFlushed","segmentFlush","cloneReplaySegmentFlushForDebug","push","length","shift","flushBufferSegment","unlockSegment","stop","sessionStateUpdateObservable","subscribe","_ref","previousState","newState","hasError","lastFullSnapshotEvent","wrappedEmit","recordData","type","RecordType","FullSnapshot","IncrementalSnapshot","exceedTime","timestamp","deleteOldestStats","takeSubsequentFullSnapshot","record","emit","_startRecordBridge","startRecordBridge","snapshotCanvas","getSerializedNodeIdForDebug","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getReplayPerformanceForDebug","cloneReplayPerformanceForDebug","undefined","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","map","flushMutations","subscribeViewEnded","VIEW_ENDED","timeStampNow","ViewEnd","unsubscribe","scribeViewCreated","VIEW_CREATED","view","startClocks","timeStamp","forEach","task","sequence","creationReason","flushReason","recordsCount","recordCountsByType","assign","start","end","indexInView","rawBytesCount","stats"],"sources":["../../src/boot/startRecording.js"],"sourcesContent":["import {\n timeStampNow,\n createHttpRequest,\n LifeCycleEventType,\n addTelemetryDebug,\n ONE_SECOND,\n canUseEventBridge,\n assign\n} from '@cloudcare/browser-core'\nimport { record } from '../domain/replay/record'\nimport { startRecordBridge } from '../domain/replay/startRecordBridge'\nimport {\n startSegmentCollection,\n SEGMENT_BYTES_LIMIT\n} from '../domain/replay/segmentCollection'\nimport { RecordType } from '../types'\nimport { deleteOldestStats } from '../domain/replay/replayStats'\n/* How long to wait for error checkouts */\nexport const BUFFER_CHECKOUT_TIME = 60 * ONE_SECOND\nvar REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT = 10\nexport function startRecording(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n encoder,\n httpRequest\n) {\n var cleanupTasks = []\n var lastReplaySegmentFlushForDebug\n var replaySegmentFlushHistoryForDebug = []\n var replaySegmentFlushCount = 0\n var reportError = function (error) {\n lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED, { error: error })\n addTelemetryDebug('Error reported to customer', {\n 'error.message': error.message\n })\n }\n\n var replayRequest =\n httpRequest ||\n createHttpRequest(\n configuration.sessionReplayEndPoint,\n SEGMENT_BYTES_LIMIT,\n configuration.retryMaxSize,\n reportError\n )\n\n let addRecord, _record\n if (!canUseEventBridge()) {\n const session = sessionManager.findTrackedSession()\n let isRecordErrorSessionReplay =\n session && session.errorSessionReplayAllowed && !session.sessionHasError\n var segmentCollection = startSegmentCollection(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n replayRequest,\n encoder,\n isRecordErrorSessionReplay,\n {\n onSegmentFlushed: function (segmentFlush) {\n replaySegmentFlushCount += 1\n lastReplaySegmentFlushForDebug =\n cloneReplaySegmentFlushForDebug(\n segmentFlush,\n replaySegmentFlushCount\n )\n replaySegmentFlushHistoryForDebug.push(lastReplaySegmentFlushForDebug)\n if (\n replaySegmentFlushHistoryForDebug.length >\n REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT\n ) {\n replaySegmentFlushHistoryForDebug.shift()\n }\n }\n }\n )\n addRecord = segmentCollection.addRecord\n let flushBufferSegment = segmentCollection.flushBufferSegment\n let unlockSegment = segmentCollection.unlockSegment\n cleanupTasks.push(segmentCollection.stop)\n if (isRecordErrorSessionReplay) {\n sessionManager.sessionStateUpdateObservable.subscribe(\n ({ previousState, newState }) => {\n if (!previousState.hasError && newState.hasError) {\n isRecordErrorSessionReplay = false\n unlockSegment()\n }\n }\n )\n }\n let lastFullSnapshotEvent = null\n const wrappedEmit = (recordData) => {\n addRecord(recordData)\n if (isRecordErrorSessionReplay) {\n if (recordData.type === RecordType.FullSnapshot) {\n lastFullSnapshotEvent = recordData\n } else if (recordData.type === RecordType.IncrementalSnapshot) {\n const exceedTime =\n recordData.timestamp - lastFullSnapshotEvent.timestamp >\n BUFFER_CHECKOUT_TIME\n // If the time between the last full snapshot and the incremental snapshot is greater than the buffer time, we need to take a new full snapshot\n if (exceedTime) {\n flushBufferSegment(() => {\n deleteOldestStats()\n takeSubsequentFullSnapshot()\n })\n }\n }\n }\n }\n _record = record({\n emit: wrappedEmit,\n configuration: configuration,\n lifeCycle: lifeCycle,\n sessionManager: sessionManager\n })\n } else {\n ;({ addRecord } = startRecordBridge(viewContexts))\n _record = record({\n emit: addRecord,\n configuration: configuration,\n lifeCycle: lifeCycle,\n sessionManager: sessionManager\n })\n }\n cleanupTasks.push(_record.stop)\n var takeSubsequentFullSnapshot = _record.takeSubsequentFullSnapshot\n var snapshotCanvas = _record.snapshotCanvas\n var getSerializedNodeIdForDebug = _record.getSerializedNodeIdForDebug\n var getLastAutoCanvasSnapshotResultForDebug =\n _record.getLastAutoCanvasSnapshotResultForDebug\n var getAutoCanvasSnapshotDebugHistoryForDebug =\n _record.getAutoCanvasSnapshotDebugHistoryForDebug\n var getLastCanvasMutationForDebug = _record.getLastCanvasMutationForDebug\n var getCanvasMutationHistoryForDebug =\n _record.getCanvasMutationHistoryForDebug\n var getReplayPerformanceForDebug = function () {\n return cloneReplayPerformanceForDebug(\n _record.getReplayPerformanceForDebug\n ? _record.getReplayPerformanceForDebug()\n : undefined,\n replaySegmentFlushCount\n )\n }\n var getLastReplaySegmentFlushForDebug = function () {\n return cloneReplaySegmentFlushForDebug(lastReplaySegmentFlushForDebug)\n }\n var getReplaySegmentFlushHistoryForDebug = function () {\n return replaySegmentFlushHistoryForDebug.map(function (segmentFlush) {\n return cloneReplaySegmentFlushForDebug(segmentFlush)\n })\n }\n var flushMutations = _record.flushMutations\n var subscribeViewEnded = lifeCycle.subscribe(\n LifeCycleEventType.VIEW_ENDED,\n function () {\n flushMutations()\n addRecord({\n timestamp: timeStampNow(),\n type: RecordType.ViewEnd\n })\n }\n )\n cleanupTasks.push(subscribeViewEnded.unsubscribe)\n var scribeViewCreated = lifeCycle.subscribe(\n LifeCycleEventType.VIEW_CREATED,\n function (view) {\n takeSubsequentFullSnapshot(view.startClocks.timeStamp)\n }\n )\n cleanupTasks.push(scribeViewCreated.unsubscribe)\n\n return {\n stop: function () {\n cleanupTasks.forEach(function (task) {\n task()\n })\n },\n takeSubsequentFullSnapshot: takeSubsequentFullSnapshot,\n snapshotCanvas: snapshotCanvas,\n getSerializedNodeIdForDebug: getSerializedNodeIdForDebug,\n getLastAutoCanvasSnapshotResultForDebug:\n getLastAutoCanvasSnapshotResultForDebug,\n getAutoCanvasSnapshotDebugHistoryForDebug:\n getAutoCanvasSnapshotDebugHistoryForDebug,\n getLastCanvasMutationForDebug: getLastCanvasMutationForDebug,\n getCanvasMutationHistoryForDebug: getCanvasMutationHistoryForDebug,\n getLastReplaySegmentFlushForDebug: getLastReplaySegmentFlushForDebug,\n getReplaySegmentFlushHistoryForDebug:\n getReplaySegmentFlushHistoryForDebug,\n getReplayPerformanceForDebug: getReplayPerformanceForDebug\n }\n}\n\nfunction cloneReplaySegmentFlushForDebug(segmentFlush, sequence) {\n if (!segmentFlush) {\n return segmentFlush\n }\n\n return {\n sequence: typeof sequence === 'number' ? sequence : segmentFlush.sequence,\n creationReason: segmentFlush.creationReason,\n flushReason: segmentFlush.flushReason,\n recordsCount: segmentFlush.recordsCount,\n recordCountsByType: assign({}, segmentFlush.recordCountsByType),\n start: segmentFlush.start,\n end: segmentFlush.end,\n indexInView: segmentFlush.indexInView,\n rawBytesCount: segmentFlush.rawBytesCount\n }\n}\n\nfunction cloneReplayPerformanceForDebug(stats, replaySegmentFlushCount) {\n if (!stats && typeof replaySegmentFlushCount === 'undefined') {\n return undefined\n }\n\n return assign({}, stats || {}, {\n replaySegmentFlushCount: replaySegmentFlushCount || 0\n })\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA;AACO,IAAMM,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,EAAE,GAAGE,uBAAU;AACnD,IAAIC,kCAAkC,GAAG,EAAE;AACpC,SAASC,cAAcA,CAC5BC,SAAS,EACTC,aAAa,EACbC,cAAc,EACdC,YAAY,EACZC,OAAO,EACPC,WAAW,EACX;EACA,IAAIC,YAAY,GAAG,EAAE;EACrB,IAAIC,8BAA8B;EAClC,IAAIC,iCAAiC,GAAG,EAAE;EAC1C,IAAIC,uBAAuB,GAAG,CAAC;EAC/B,IAAIC,WAAW,GAAG,SAAdA,WAAWA,CAAaC,KAAK,EAAE;IACjCX,SAAS,CAACY,MAAM,CAACC,+BAAkB,CAACC,mBAAmB,EAAE;MAAEH,KAAK,EAAEA;IAAM,CAAC,CAAC;IAC1E,IAAAI,8BAAiB,EAAC,4BAA4B,EAAE;MAC9C,eAAe,EAAEJ,KAAK,CAACK;IACzB,CAAC,CAAC;EACJ,CAAC;EAED,IAAIC,aAAa,GACfZ,WAAW,IACX,IAAAa,8BAA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AC6D,GAAG;IACrBC,WAAW,EAAE9D,YAAY,CAAC8D,WAAW;IACrCC,aAAa,EAAE/D,YAAY,CAAC+D;EAC9B,CAAC;AACH;AAEA,SAAS3B,8BAA8BA,CAAC4B,KAAK,EAAExF,uBAAuB,EAAE;EACtE,IAAI,CAACwF,KAAK,IAAI,OAAOxF,uBAAuB,KAAK,WAAW,EAAE;IAC5D,OAAO6D,SAAS;EAClB;EAEA,OAAO,IAAAsB,mBAAM,EAAC,CAAC,CAAC,EAAEK,KAAK,IAAI,CAAC,CAAC,EAAE;IAC7BxF,uBAAuB,EAAEA,uBAAuB,IAAI;EACtD,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"startRecording.js","names":["_browserCore","require","_record2","_startRecordBridge2","_segmentCollection","_types","_replayStats","BUFFER_CHECKOUT_TIME","exports","ONE_SECOND","REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT","startRecording","lifeCycle","configuration","sessionManager","viewContexts","encoder","httpRequest","cleanupTasks","lastReplaySegmentFlushForDebug","replaySegmentFlushHistoryForDebug","replaySegmentFlushCount","reportError","error","notify","LifeCycleEventType","RAW_ERROR_COLLECTED","addTelemetryDebug","message","replayRequest","createHttpRequest","sessionReplayEndPoint","SEGMENT_BYTES_LIMIT","retryMaxSize","addRecord","_record","canUseEventBridge","session","findTrackedSession","isRecordErrorSessionReplay","errorSessionReplayAllowed","sessionHasError","segmentCollection","startSegmentCollection","onSegmentFlushed","segmentFlush","cloneReplaySegmentFlushForDebug","push","length","shift","flushBufferSegment","unlockSegment","stop","sessionStateUpdateObservable","subscribe","_ref","previousState","newState","hasError","lastFullSnapshotEvent","wrappedEmit","recordData","type","RecordType","FullSnapshot","IncrementalSnapshot","exceedTime","timestamp","deleteOldestStats","takeSubsequentFullSnapshot","record","emit","_startRecordBridge","startRecordBridge","snapshotCanvas","getSerializedNodeIdForDebug","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getReplayPerformanceForDebug","cloneReplayPerformanceForDebug","undefined","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","map","flushMutations","subscribeViewEnded","VIEW_ENDED","timeStampNow","ViewEnd","unsubscribe","scribeViewCreated","VIEW_CREATED","view","startClocks","timeStamp","forEach","task","flushReplayMutationsForDebug","sequence","creationReason","flushReason","recordsCount","recordCountsByType","assign","start","end","indexInView","rawBytesCount","stats"],"sources":["../../src/boot/startRecording.js"],"sourcesContent":["import {\n timeStampNow,\n createHttpRequest,\n LifeCycleEventType,\n addTelemetryDebug,\n ONE_SECOND,\n canUseEventBridge,\n assign\n} from '@cloudcare/browser-core'\nimport { record } from '../domain/replay/record'\nimport { startRecordBridge } from '../domain/replay/startRecordBridge'\nimport {\n startSegmentCollection,\n SEGMENT_BYTES_LIMIT\n} from '../domain/replay/segmentCollection'\nimport { RecordType } from '../types'\nimport { deleteOldestStats } from '../domain/replay/replayStats'\n/* How long to wait for error checkouts */\nexport const BUFFER_CHECKOUT_TIME = 60 * ONE_SECOND\nvar REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT = 10\nexport function startRecording(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n encoder,\n httpRequest\n) {\n var cleanupTasks = []\n var lastReplaySegmentFlushForDebug\n var replaySegmentFlushHistoryForDebug = []\n var replaySegmentFlushCount = 0\n var reportError = function (error) {\n lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED, { error: error })\n addTelemetryDebug('Error reported to customer', {\n 'error.message': error.message\n })\n }\n\n var replayRequest =\n httpRequest ||\n createHttpRequest(\n configuration.sessionReplayEndPoint,\n SEGMENT_BYTES_LIMIT,\n configuration.retryMaxSize,\n reportError\n )\n\n let addRecord, _record\n if (!canUseEventBridge()) {\n const session = sessionManager.findTrackedSession()\n let isRecordErrorSessionReplay =\n session && session.errorSessionReplayAllowed && !session.sessionHasError\n var segmentCollection = startSegmentCollection(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n replayRequest,\n encoder,\n isRecordErrorSessionReplay,\n {\n onSegmentFlushed: function (segmentFlush) {\n replaySegmentFlushCount += 1\n lastReplaySegmentFlushForDebug =\n cloneReplaySegmentFlushForDebug(\n segmentFlush,\n replaySegmentFlushCount\n )\n replaySegmentFlushHistoryForDebug.push(lastReplaySegmentFlushForDebug)\n if (\n replaySegmentFlushHistoryForDebug.length >\n REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT\n ) {\n replaySegmentFlushHistoryForDebug.shift()\n }\n }\n }\n )\n addRecord = segmentCollection.addRecord\n let flushBufferSegment = segmentCollection.flushBufferSegment\n let unlockSegment = segmentCollection.unlockSegment\n cleanupTasks.push(segmentCollection.stop)\n if (isRecordErrorSessionReplay) {\n sessionManager.sessionStateUpdateObservable.subscribe(\n ({ previousState, newState }) => {\n if (!previousState.hasError && newState.hasError) {\n isRecordErrorSessionReplay = false\n unlockSegment()\n }\n }\n )\n }\n let lastFullSnapshotEvent = null\n const wrappedEmit = (recordData) => {\n addRecord(recordData)\n if (isRecordErrorSessionReplay) {\n if (recordData.type === RecordType.FullSnapshot) {\n lastFullSnapshotEvent = recordData\n } else if (recordData.type === RecordType.IncrementalSnapshot) {\n const exceedTime =\n recordData.timestamp - lastFullSnapshotEvent.timestamp >\n BUFFER_CHECKOUT_TIME\n // If the time between the last full snapshot and the incremental snapshot is greater than the buffer time, we need to take a new full snapshot\n if (exceedTime) {\n flushBufferSegment(() => {\n deleteOldestStats()\n takeSubsequentFullSnapshot()\n })\n }\n }\n }\n }\n _record = record({\n emit: wrappedEmit,\n configuration: configuration,\n lifeCycle: lifeCycle,\n sessionManager: sessionManager\n })\n } else {\n ;({ addRecord } = startRecordBridge(viewContexts))\n _record = record({\n emit: addRecord,\n configuration: configuration,\n lifeCycle: lifeCycle,\n sessionManager: sessionManager\n })\n }\n cleanupTasks.push(_record.stop)\n var takeSubsequentFullSnapshot = _record.takeSubsequentFullSnapshot\n var snapshotCanvas = _record.snapshotCanvas\n var getSerializedNodeIdForDebug = _record.getSerializedNodeIdForDebug\n var getLastAutoCanvasSnapshotResultForDebug =\n _record.getLastAutoCanvasSnapshotResultForDebug\n var getAutoCanvasSnapshotDebugHistoryForDebug =\n _record.getAutoCanvasSnapshotDebugHistoryForDebug\n var getLastCanvasMutationForDebug = _record.getLastCanvasMutationForDebug\n var getCanvasMutationHistoryForDebug =\n _record.getCanvasMutationHistoryForDebug\n var getLastDomMutationForDebug = _record.getLastDomMutationForDebug\n var getDomMutationHistoryForDebug = _record.getDomMutationHistoryForDebug\n var getReplayPerformanceForDebug = function () {\n return cloneReplayPerformanceForDebug(\n _record.getReplayPerformanceForDebug\n ? _record.getReplayPerformanceForDebug()\n : undefined,\n replaySegmentFlushCount\n )\n }\n var getLastReplaySegmentFlushForDebug = function () {\n return cloneReplaySegmentFlushForDebug(lastReplaySegmentFlushForDebug)\n }\n var getReplaySegmentFlushHistoryForDebug = function () {\n return replaySegmentFlushHistoryForDebug.map(function (segmentFlush) {\n return cloneReplaySegmentFlushForDebug(segmentFlush)\n })\n }\n var flushMutations = _record.flushMutations\n var subscribeViewEnded = lifeCycle.subscribe(\n LifeCycleEventType.VIEW_ENDED,\n function () {\n flushMutations()\n addRecord({\n timestamp: timeStampNow(),\n type: RecordType.ViewEnd\n })\n }\n )\n cleanupTasks.push(subscribeViewEnded.unsubscribe)\n var scribeViewCreated = lifeCycle.subscribe(\n LifeCycleEventType.VIEW_CREATED,\n function (view) {\n takeSubsequentFullSnapshot(view.startClocks.timeStamp)\n }\n )\n cleanupTasks.push(scribeViewCreated.unsubscribe)\n\n return {\n stop: function () {\n cleanupTasks.forEach(function (task) {\n task()\n })\n },\n takeSubsequentFullSnapshot: takeSubsequentFullSnapshot,\n snapshotCanvas: snapshotCanvas,\n getSerializedNodeIdForDebug: getSerializedNodeIdForDebug,\n getLastAutoCanvasSnapshotResultForDebug:\n getLastAutoCanvasSnapshotResultForDebug,\n getAutoCanvasSnapshotDebugHistoryForDebug:\n getAutoCanvasSnapshotDebugHistoryForDebug,\n getLastCanvasMutationForDebug: getLastCanvasMutationForDebug,\n getCanvasMutationHistoryForDebug: getCanvasMutationHistoryForDebug,\n getLastDomMutationForDebug: getLastDomMutationForDebug,\n getDomMutationHistoryForDebug: getDomMutationHistoryForDebug,\n getLastReplaySegmentFlushForDebug: getLastReplaySegmentFlushForDebug,\n getReplaySegmentFlushHistoryForDebug:\n getReplaySegmentFlushHistoryForDebug,\n getReplayPerformanceForDebug: getReplayPerformanceForDebug,\n flushReplayMutationsForDebug: flushMutations\n }\n}\n\nfunction cloneReplaySegmentFlushForDebug(segmentFlush, sequence) {\n if (!segmentFlush) {\n return segmentFlush\n }\n\n return {\n sequence: typeof sequence === 'number' ? sequence : segmentFlush.sequence,\n creationReason: segmentFlush.creationReason,\n flushReason: segmentFlush.flushReason,\n recordsCount: segmentFlush.recordsCount,\n recordCountsByType: assign({}, segmentFlush.recordCountsByType),\n start: segmentFlush.start,\n end: segmentFlush.end,\n indexInView: segmentFlush.indexInView,\n rawBytesCount: segmentFlush.rawBytesCount\n }\n}\n\nfunction cloneReplayPerformanceForDebug(stats, replaySegmentFlushCount) {\n if (!stats && typeof replaySegmentFlushCount === 'undefined') {\n return undefined\n }\n\n return assign({}, stats || {}, {\n replaySegmentFlushCount: replaySegmentFlushCount || 0\n })\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA;AACO,IAAMM,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,EAAE,GAAGE,uBAAU;AACnD,IAAIC,kCAAkC,GAAG,EAAE;AACpC,SAASC,cAAcA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