@cloudcare/browser-rum 2.2.15 → 3.0.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 +161 -0
- package/cjs/boot/rum.entry.js +6 -1
- package/cjs/boot/rum.js +15 -5
- package/cjs/boot/rumPublicApi.js +8 -4
- package/cjs/boot/startRecording.js +55 -0
- package/cjs/constants.js +52 -0
- package/cjs/domain/assembly.js +1 -7
- package/cjs/domain/configuration.js +3 -2
- package/cjs/domain/contexts/foregroundContexts.js +138 -0
- package/cjs/domain/contexts/internalContext.js +1 -1
- package/cjs/domain/contexts/urlContexts.js +9 -2
- package/cjs/domain/domMutationCollection.js +4 -5
- package/cjs/domain/initViewportObservable.js +52 -0
- package/cjs/domain/locationChangeObservable.js +12 -26
- package/cjs/domain/performanceCollection.js +2 -13
- package/cjs/domain/replay/record/elementsScrollPositions.js +27 -0
- package/cjs/domain/replay/record/index.js +41 -0
- package/cjs/domain/replay/record/mutationBatch.js +58 -0
- package/cjs/domain/replay/record/mutationObserver.js +388 -0
- package/cjs/domain/replay/record/observers.js +470 -0
- package/cjs/domain/replay/record/privacy.js +256 -0
- package/cjs/domain/replay/record/record.js +174 -0
- package/cjs/domain/replay/record/serializationUtils.js +137 -0
- package/cjs/domain/replay/record/serialize.js +488 -0
- package/cjs/domain/replay/record/shadowRootsController.js +61 -0
- package/cjs/domain/replay/record/utils.js +53 -0
- package/cjs/domain/replay/record/viewports.js +104 -0
- package/cjs/domain/replay/replayStats.js +83 -0
- package/cjs/domain/replay/segmentCollection/buildReplayPayload.js +43 -0
- package/cjs/domain/replay/segmentCollection/deflateWorker.js +4400 -0
- package/cjs/domain/replay/segmentCollection/index.js +33 -0
- package/cjs/domain/replay/segmentCollection/segment.js +101 -0
- package/cjs/domain/replay/segmentCollection/segmentCollection.js +179 -0
- package/cjs/domain/replay/segmentCollection/startDeflateWorker.js +127 -0
- package/cjs/domain/requestCollection.js +35 -17
- package/cjs/domain/rumEventsCollection/actions/actionCollection.js +12 -4
- package/cjs/domain/rumEventsCollection/actions/clickChain.js +3 -3
- package/cjs/domain/rumEventsCollection/actions/computeFrustration.js +6 -5
- package/cjs/domain/rumEventsCollection/actions/getActionNameFromElement.js +8 -6
- package/cjs/domain/rumEventsCollection/actions/getSelectorsFromElement.js +111 -75
- package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js +22 -28
- package/cjs/domain/rumEventsCollection/actions/trackClickActions.js +94 -54
- package/cjs/domain/rumEventsCollection/error/errorCollection.js +13 -5
- package/cjs/domain/rumEventsCollection/view/trackViewEventCounts.js +45 -0
- package/cjs/domain/rumEventsCollection/view/trackViewMetrics.js +1 -19
- package/cjs/domain/rumEventsCollection/view/trackViews.js +21 -18
- package/cjs/domain/rumEventsCollection/view/viewCollection.js +12 -9
- package/cjs/domain/rumSessionManager.js +6 -3
- package/cjs/domain/tracing/getDocumentTraceId.js +2 -10
- package/cjs/domain/trackEventCounts.js +10 -2
- package/cjs/domain/waitPageActivityEnd.js +5 -1
- package/cjs/transport/startRumBatch.js +5 -7
- package/cjs/types/index.js +18 -0
- package/cjs/types/sessionReplayConstants.js +56 -0
- package/esm/boot/buildEnv.js +1 -1
- package/esm/boot/recorderApi.js +149 -0
- package/esm/boot/rum.entry.js +4 -1
- package/esm/boot/rum.js +15 -6
- package/esm/boot/rumPublicApi.js +8 -4
- package/esm/boot/startRecording.js +44 -0
- package/esm/constants.js +31 -0
- package/esm/domain/assembly.js +1 -7
- package/esm/domain/configuration.js +4 -3
- package/esm/domain/contexts/foregroundContexts.js +122 -0
- package/esm/domain/contexts/internalContext.js +1 -1
- package/esm/domain/contexts/urlContexts.js +10 -3
- package/esm/domain/domMutationCollection.js +5 -6
- package/esm/domain/initViewportObservable.js +39 -0
- package/esm/domain/locationChangeObservable.js +13 -27
- package/esm/domain/performanceCollection.js +1 -12
- package/esm/domain/replay/record/elementsScrollPositions.js +20 -0
- package/esm/domain/replay/record/index.js +3 -0
- package/esm/domain/replay/record/mutationBatch.js +35 -0
- package/esm/domain/replay/record/mutationObserver.js +336 -0
- package/esm/domain/replay/record/observers.js +454 -0
- package/esm/domain/replay/record/privacy.js +233 -0
- package/esm/domain/replay/record/record.js +158 -0
- package/esm/domain/replay/record/serializationUtils.js +107 -0
- package/esm/domain/replay/record/serialize.js +461 -0
- package/esm/domain/replay/record/shadowRootsController.js +49 -0
- package/esm/domain/replay/record/utils.js +38 -0
- package/esm/domain/replay/record/viewports.js +87 -0
- package/esm/domain/replay/replayStats.js +64 -0
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js +31 -0
- package/esm/domain/replay/segmentCollection/deflateWorker.js +4393 -0
- package/esm/domain/replay/segmentCollection/index.js +3 -0
- package/esm/domain/replay/segmentCollection/segment.js +84 -0
- package/esm/domain/replay/segmentCollection/segmentCollection.js +158 -0
- package/esm/domain/replay/segmentCollection/startDeflateWorker.js +114 -0
- package/esm/domain/requestCollection.js +36 -18
- package/esm/domain/rumEventsCollection/actions/actionCollection.js +12 -4
- package/esm/domain/rumEventsCollection/actions/clickChain.js +3 -3
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js +6 -5
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js +6 -6
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js +105 -74
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js +22 -28
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js +99 -59
- package/esm/domain/rumEventsCollection/error/errorCollection.js +13 -5
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js +33 -0
- package/esm/domain/rumEventsCollection/view/trackViewMetrics.js +1 -18
- package/esm/domain/rumEventsCollection/view/trackViews.js +21 -19
- package/esm/domain/rumEventsCollection/view/viewCollection.js +12 -9
- package/esm/domain/rumSessionManager.js +6 -3
- package/esm/domain/tracing/getDocumentTraceId.js +1 -9
- package/esm/domain/trackEventCounts.js +10 -2
- package/esm/domain/waitPageActivityEnd.js +5 -1
- package/esm/transport/startRumBatch.js +5 -7
- package/esm/types/index.js +1 -0
- package/esm/types/sessionReplayConstants.js +45 -0
- package/package.json +3 -3
- package/src/boot/recorderApi.js +166 -0
- package/src/boot/rum.entry.js +4 -1
- package/src/boot/rum.js +38 -10
- package/src/boot/rumPublicApi.js +13 -3
- package/src/boot/startRecording.js +77 -0
- package/src/constants.js +37 -0
- package/src/domain/assembly.js +1 -6
- package/src/domain/configuration.js +10 -2
- package/src/domain/contexts/foregroundContexts.js +140 -0
- package/src/domain/contexts/internalContext.js +10 -4
- package/src/domain/contexts/urlContexts.js +29 -15
- package/src/domain/domMutationCollection.js +14 -6
- package/src/domain/initViewportObservable.js +46 -0
- package/src/domain/locationChangeObservable.js +17 -25
- package/src/domain/performanceCollection.js +42 -42
- package/src/domain/replay/record/elementsScrollPositions.js +22 -0
- package/src/domain/replay/record/index.js +7 -0
- package/src/domain/replay/record/mutationBatch.js +38 -0
- package/src/domain/replay/record/mutationObserver.js +403 -0
- package/src/domain/replay/record/observers.js +565 -0
- package/src/domain/replay/record/privacy.js +304 -0
- package/src/domain/replay/record/record.js +158 -0
- package/src/domain/replay/record/serializationUtils.js +134 -0
- package/src/domain/replay/record/serialize.js +497 -0
- package/src/domain/replay/record/shadowRootsController.js +58 -0
- package/src/domain/replay/record/utils.js +44 -0
- package/src/domain/replay/record/viewports.js +89 -0
- package/src/domain/replay/replayStats.js +67 -0
- package/src/domain/replay/segmentCollection/buildReplayPayload.js +34 -0
- package/src/domain/replay/segmentCollection/deflateWorker.js +4584 -0
- package/src/domain/replay/segmentCollection/index.js +6 -0
- package/src/domain/replay/segmentCollection/segment.js +86 -0
- package/src/domain/replay/segmentCollection/segmentCollection.js +205 -0
- package/src/domain/replay/segmentCollection/startDeflateWorker.js +102 -0
- package/src/domain/requestCollection.js +64 -28
- package/src/domain/rumEventsCollection/actions/actionCollection.js +11 -4
- package/src/domain/rumEventsCollection/actions/clickChain.js +3 -3
- package/src/domain/rumEventsCollection/actions/computeFrustration.js +7 -4
- package/src/domain/rumEventsCollection/actions/getActionNameFromElement.js +9 -6
- package/src/domain/rumEventsCollection/actions/getSelectorsFromElement.js +130 -108
- package/src/domain/rumEventsCollection/actions/listenActionEvents.js +26 -27
- package/src/domain/rumEventsCollection/actions/trackClickActions.js +162 -92
- package/src/domain/rumEventsCollection/error/errorCollection.js +11 -5
- package/src/domain/rumEventsCollection/view/trackViewEventCounts.js +38 -0
- package/src/domain/rumEventsCollection/view/trackViewMetrics.js +1 -19
- package/src/domain/rumEventsCollection/view/trackViews.js +98 -68
- package/src/domain/rumEventsCollection/view/viewCollection.js +15 -7
- package/src/domain/rumSessionManager.js +33 -19
- package/src/domain/tracing/getDocumentTraceId.js +6 -9
- package/src/domain/trackEventCounts.js +10 -4
- package/src/domain/waitPageActivityEnd.js +4 -1
- package/src/transport/startRumBatch.js +29 -24
- package/src/types/index.js +1 -0
- package/src/types/sessionReplayConstants.js +49 -0
|
@@ -9,27 +9,10 @@ var _browserCore = require("@cloudcare/browser-core");
|
|
|
9
9
|
|
|
10
10
|
var _performanceCollection = require("../../performanceCollection");
|
|
11
11
|
|
|
12
|
-
var _trackEventCounts2 = require("../../trackEventCounts");
|
|
13
|
-
|
|
14
12
|
var _waitPageActivityEnd2 = require("../../waitPageActivityEnd");
|
|
15
13
|
|
|
16
14
|
function trackViewMetrics(lifeCycle, domMutationObservable, configuration, scheduleViewUpdate, loadingType, viewStart) {
|
|
17
|
-
var viewMetrics = {
|
|
18
|
-
eventCounts: {
|
|
19
|
-
errorCount: 0,
|
|
20
|
-
longTaskCount: 0,
|
|
21
|
-
resourceCount: 0,
|
|
22
|
-
actionCount: 0,
|
|
23
|
-
frustrationCount: 0
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var _trackEventCounts = (0, _trackEventCounts2.trackEventCounts)(lifeCycle, function (newEventCounts) {
|
|
28
|
-
viewMetrics.eventCounts = newEventCounts;
|
|
29
|
-
scheduleViewUpdate();
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
var stopEventCountsTracking = _trackEventCounts.stop;
|
|
15
|
+
var viewMetrics = {};
|
|
33
16
|
|
|
34
17
|
var _trackLoadingTime = trackLoadingTime(lifeCycle, domMutationObservable, configuration, loadingType, viewStart, function (newLoadingTime) {
|
|
35
18
|
viewMetrics.loadingTime = newLoadingTime;
|
|
@@ -55,7 +38,6 @@ function trackViewMetrics(lifeCycle, domMutationObservable, configuration, sched
|
|
|
55
38
|
|
|
56
39
|
return {
|
|
57
40
|
stop: function stop() {
|
|
58
|
-
stopEventCountsTracking();
|
|
59
41
|
stopLoadingTimeTracking();
|
|
60
42
|
stopCLSTracking();
|
|
61
43
|
},
|
|
@@ -12,6 +12,8 @@ var _trackInitialViewTimings2 = require("./trackInitialViewTimings");
|
|
|
12
12
|
|
|
13
13
|
var _trackViewMetrics2 = require("./trackViewMetrics");
|
|
14
14
|
|
|
15
|
+
var _trackViewEventCounts2 = require("./trackViewEventCounts");
|
|
16
|
+
|
|
15
17
|
var THROTTLE_VIEW_UPDATE_PERIOD = 3000;
|
|
16
18
|
exports.THROTTLE_VIEW_UPDATE_PERIOD = THROTTLE_VIEW_UPDATE_PERIOD;
|
|
17
19
|
var SESSION_KEEP_ALIVE_INTERVAL = 5 * _browserCore.ONE_MINUTE;
|
|
@@ -63,9 +65,11 @@ function trackViews(location, lifeCycle, domMutationObservable, configuration, l
|
|
|
63
65
|
});
|
|
64
66
|
}); // End the current view on page unload
|
|
65
67
|
|
|
66
|
-
lifeCycle.subscribe(_browserCore.LifeCycleEventType.
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
lifeCycle.subscribe(_browserCore.LifeCycleEventType.PAGE_EXITED, function (pageExitEvent) {
|
|
69
|
+
if (pageExitEvent.reason === _browserCore.PageExitReason.UNLOADING || pageExitEvent.reason === _browserCore.PageExitReason.PAGEHIDE) {
|
|
70
|
+
currentView.end();
|
|
71
|
+
currentView.triggerUpdate();
|
|
72
|
+
}
|
|
69
73
|
}); // Session keep alive
|
|
70
74
|
|
|
71
75
|
var keepAliveInterval = window.setInterval(function () {
|
|
@@ -148,16 +152,23 @@ function newView(lifeCycle, domMutationObservable, configuration, initialLocatio
|
|
|
148
152
|
version: version
|
|
149
153
|
}); // Update the view every time the measures are changing
|
|
150
154
|
|
|
151
|
-
var
|
|
155
|
+
var _scheduleViewUpdate = (0, _browserCore.throttle)(triggerViewUpdate, THROTTLE_VIEW_UPDATE_PERIOD, {
|
|
152
156
|
leading: false
|
|
153
157
|
});
|
|
154
|
-
|
|
158
|
+
|
|
159
|
+
var scheduleViewUpdate = _scheduleViewUpdate.throttled;
|
|
160
|
+
var cancelScheduleViewUpdate = _scheduleViewUpdate.cancel;
|
|
155
161
|
|
|
156
162
|
var _trackViewMetrics = (0, _trackViewMetrics2.trackViewMetrics)(lifeCycle, domMutationObservable, configuration, scheduleViewUpdate, loadingType, startClocks);
|
|
157
163
|
|
|
158
164
|
var setLoadEvent = _trackViewMetrics.setLoadEvent;
|
|
159
165
|
var stopViewMetricsTracking = _trackViewMetrics.stop;
|
|
160
|
-
var viewMetrics = _trackViewMetrics.viewMetrics;
|
|
166
|
+
var viewMetrics = _trackViewMetrics.viewMetrics;
|
|
167
|
+
|
|
168
|
+
var _trackViewEventCounts = (0, _trackViewEventCounts2.trackViewEventCounts)(lifeCycle, id, scheduleViewUpdate);
|
|
169
|
+
|
|
170
|
+
var scheduleStopEventCountsTracking = _trackViewEventCounts.scheduleStop;
|
|
171
|
+
var eventCounts = _trackViewEventCounts.eventCounts; // Initial view update
|
|
161
172
|
|
|
162
173
|
triggerViewUpdate();
|
|
163
174
|
|
|
@@ -176,7 +187,8 @@ function newView(lifeCycle, domMutationObservable, configuration, initialLocatio
|
|
|
176
187
|
startClocks: startClocks,
|
|
177
188
|
timings: timings,
|
|
178
189
|
duration: (0, _browserCore.elapsed)(startClocks.timeStamp, currentEnd),
|
|
179
|
-
isActive: endClocks === undefined
|
|
190
|
+
isActive: endClocks === undefined,
|
|
191
|
+
eventCounts: eventCounts
|
|
180
192
|
}, viewMetrics));
|
|
181
193
|
}
|
|
182
194
|
|
|
@@ -195,6 +207,7 @@ function newView(lifeCycle, domMutationObservable, configuration, initialLocatio
|
|
|
195
207
|
endClocks: endClocks
|
|
196
208
|
});
|
|
197
209
|
stopViewMetricsTracking();
|
|
210
|
+
scheduleStopEventCountsTracking;
|
|
198
211
|
},
|
|
199
212
|
triggerUpdate: function triggerUpdate() {
|
|
200
213
|
// cancel any pending view updates execution
|
|
@@ -230,15 +243,5 @@ function sanitizeTiming(name) {
|
|
|
230
243
|
}
|
|
231
244
|
|
|
232
245
|
function areDifferentLocation(currentLocation, otherLocation) {
|
|
233
|
-
return currentLocation.pathname !== otherLocation.pathname || !isHashAnAnchor(otherLocation.hash) && getPathFromHash(otherLocation.hash) !== getPathFromHash(currentLocation.hash);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function isHashAnAnchor(hash) {
|
|
237
|
-
var correspondingId = hash.substr(1);
|
|
238
|
-
return !!document.getElementById(correspondingId);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
function getPathFromHash(hash) {
|
|
242
|
-
var index = hash.indexOf('?');
|
|
243
|
-
return index < 0 ? hash : hash.slice(0, index);
|
|
246
|
+
return currentLocation.pathname !== otherLocation.pathname || !(0, _browserCore.isHashAnAnchor)(otherLocation.hash) && (0, _browserCore.getPathFromHash)(otherLocation.hash) !== (0, _browserCore.getPathFromHash)(currentLocation.hash);
|
|
244
247
|
}
|
|
@@ -11,9 +11,9 @@ var _trackViews = require("./trackViews");
|
|
|
11
11
|
|
|
12
12
|
var _resourceUtils = require("../resource/resourceUtils");
|
|
13
13
|
|
|
14
|
-
function startViewCollection(lifeCycle, configuration, location, domMutationObservable, locationChangeObservable, initialViewOptions) {
|
|
14
|
+
function startViewCollection(lifeCycle, configuration, location, domMutationObservable, locationChangeObservable, foregroundContexts, recorderApi, initialViewOptions) {
|
|
15
15
|
lifeCycle.subscribe(_browserCore.LifeCycleEventType.VIEW_UPDATED, function (view) {
|
|
16
|
-
lifeCycle.notify(_browserCore.LifeCycleEventType.RAW_RUM_EVENT_COLLECTED, processViewUpdate(view));
|
|
16
|
+
lifeCycle.notify(_browserCore.LifeCycleEventType.RAW_RUM_EVENT_COLLECTED, processViewUpdate(view, foregroundContexts, recorderApi));
|
|
17
17
|
});
|
|
18
18
|
return (0, _trackViews.trackViews)(location, lifeCycle, domMutationObservable, configuration, locationChangeObservable, !configuration.trackViewsManually, initialViewOptions);
|
|
19
19
|
}
|
|
@@ -68,10 +68,12 @@ function computePerformanceViewDetails(entry) {
|
|
|
68
68
|
return details;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
function processViewUpdate(view) {
|
|
71
|
+
function processViewUpdate(view, foregroundContexts, recorderApi) {
|
|
72
|
+
var replayStats = recorderApi.getReplayStats(view.id);
|
|
72
73
|
var viewEvent = {
|
|
73
74
|
_dd: {
|
|
74
|
-
document_version: view.documentVersion
|
|
75
|
+
document_version: view.documentVersion,
|
|
76
|
+
replay_stats: replayStats
|
|
75
77
|
},
|
|
76
78
|
date: view.startClocks.timeStamp,
|
|
77
79
|
type: _browserCore.RumEventType.VIEW,
|
|
@@ -105,11 +107,12 @@ function processViewUpdate(view) {
|
|
|
105
107
|
resource: {
|
|
106
108
|
count: view.eventCounts.resourceCount
|
|
107
109
|
},
|
|
108
|
-
time_spent: (0, _browserCore.toServerDuration)(view.duration)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
time_spent: (0, _browserCore.toServerDuration)(view.duration),
|
|
111
|
+
in_foreground_periods: foregroundContexts.selectInForegroundPeriodsFor(view.startClocks.relative, view.duration)
|
|
112
|
+
},
|
|
113
|
+
session: {
|
|
114
|
+
has_replay: replayStats ? true : undefined
|
|
115
|
+
}
|
|
113
116
|
};
|
|
114
117
|
|
|
115
118
|
if (!(0, _browserCore.isEmptyObject)(view.customTimings)) {
|
|
@@ -12,8 +12,8 @@ var _browserCore = require("@cloudcare/browser-core");
|
|
|
12
12
|
var RUM_SESSION_KEY = 'rum';
|
|
13
13
|
exports.RUM_SESSION_KEY = RUM_SESSION_KEY;
|
|
14
14
|
var RumSessionPlan = {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
WITHOUT_SESSION_REPLAY: 1,
|
|
16
|
+
WITH_SESSION_REPLAY: 2
|
|
17
17
|
};
|
|
18
18
|
exports.RumSessionPlan = RumSessionPlan;
|
|
19
19
|
var RumTrackingType = {
|
|
@@ -44,8 +44,11 @@ function startRumSessionManager(configuration, lifeCycle) {
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
var plan = session.trackingType === RumTrackingType.TRACKED_WITH_SESSION_REPLAY ? RumSessionPlan.WITH_SESSION_REPLAY : RumSessionPlan.WITHOUT_SESSION_REPLAY;
|
|
47
48
|
return {
|
|
48
|
-
id: session.id
|
|
49
|
+
id: session.id,
|
|
50
|
+
plan: plan,
|
|
51
|
+
sessionReplayAllowed: plan === RumSessionPlan.WITH_SESSION_REPLAY
|
|
49
52
|
};
|
|
50
53
|
}
|
|
51
54
|
};
|
|
@@ -80,7 +80,7 @@ function findTraceComment(document) {
|
|
|
80
80
|
return comment;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
if (!isTextNode(node)) {
|
|
83
|
+
if (!(0, _browserCore.isTextNode)(node)) {
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -88,19 +88,11 @@ function findTraceComment(document) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
function getTraceCommentFromNode(node) {
|
|
91
|
-
if (node && isCommentNode(node)) {
|
|
91
|
+
if (node && (0, _browserCore.isCommentNode)(node)) {
|
|
92
92
|
var match = node.data.match(/^\s*DATADOG;(.*?)\s*$/);
|
|
93
93
|
|
|
94
94
|
if (match) {
|
|
95
95
|
return match[1];
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function isCommentNode() {
|
|
101
|
-
return node.nodeName === '#comment';
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function isTextNode(node) {
|
|
105
|
-
return node.nodeName === '#text';
|
|
106
98
|
}
|
|
@@ -7,8 +7,12 @@ exports.trackEventCounts = trackEventCounts;
|
|
|
7
7
|
|
|
8
8
|
var _browserCore = require("@cloudcare/browser-core");
|
|
9
9
|
|
|
10
|
-
function trackEventCounts(
|
|
11
|
-
|
|
10
|
+
function trackEventCounts(data) {
|
|
11
|
+
var lifeCycle = data.lifeCycle;
|
|
12
|
+
var isChildEvent = data.isChildEvent;
|
|
13
|
+
var callback = data.onChange;
|
|
14
|
+
|
|
15
|
+
if (callback === undefined) {
|
|
12
16
|
callback = _browserCore.noop;
|
|
13
17
|
}
|
|
14
18
|
|
|
@@ -20,6 +24,10 @@ function trackEventCounts(lifeCycle, callback) {
|
|
|
20
24
|
frustrationCount: 0
|
|
21
25
|
};
|
|
22
26
|
var subscription = lifeCycle.subscribe(_browserCore.LifeCycleEventType.RUM_EVENT_COLLECTED, function (event) {
|
|
27
|
+
if (event.type === _browserCore.RumEventType.VIEW || !isChildEvent(event)) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
switch (event.type) {
|
|
24
32
|
case _browserCore.RumEventType.ERROR:
|
|
25
33
|
eventCounts.errorCount += 1;
|
|
@@ -136,8 +136,12 @@ function createPageActivityObservable(lifeCycle, domMutationObservable, configur
|
|
|
136
136
|
pendingRequestsCount -= 1;
|
|
137
137
|
notifyPageActivity();
|
|
138
138
|
}));
|
|
139
|
-
|
|
139
|
+
|
|
140
|
+
var _trackWindowOpen = trackWindowOpen(notifyPageActivity);
|
|
141
|
+
|
|
142
|
+
var stopTrackingWindowOpen = _trackWindowOpen.stop;
|
|
140
143
|
return function () {
|
|
144
|
+
stopTrackingWindowOpen();
|
|
141
145
|
(0, _browserCore.each)(subscriptions, function (s) {
|
|
142
146
|
s.unsubscribe();
|
|
143
147
|
});
|
|
@@ -7,8 +7,8 @@ exports.startRumBatch = startRumBatch;
|
|
|
7
7
|
|
|
8
8
|
var _browserCore = require("@cloudcare/browser-core");
|
|
9
9
|
|
|
10
|
-
function startRumBatch(configuration, lifeCycle, reportError) {
|
|
11
|
-
var batch = makeRumBatch(configuration,
|
|
10
|
+
function startRumBatch(configuration, lifeCycle, reportError, pageExitObservable) {
|
|
11
|
+
var batch = makeRumBatch(configuration, reportError, pageExitObservable);
|
|
12
12
|
lifeCycle.subscribe(_browserCore.LifeCycleEventType.RUM_EVENT_COLLECTED, function (serverRumEvent) {
|
|
13
13
|
if (serverRumEvent.type === _browserCore.RumEventType.VIEW) {
|
|
14
14
|
batch.upsert(serverRumEvent, serverRumEvent.view.id);
|
|
@@ -18,13 +18,11 @@ function startRumBatch(configuration, lifeCycle, reportError) {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function makeRumBatch(configuration,
|
|
22
|
-
var primaryBatch = createRumBatch(configuration.datakitUrl
|
|
23
|
-
lifeCycle.notify(_browserCore.LifeCycleEventType.BEFORE_UNLOAD);
|
|
24
|
-
});
|
|
21
|
+
function makeRumBatch(configuration, reportError, pageExitObservable) {
|
|
22
|
+
var primaryBatch = createRumBatch(configuration.datakitUrl);
|
|
25
23
|
|
|
26
24
|
function createRumBatch(endpointUrl, unloadCallback) {
|
|
27
|
-
return new _browserCore.Batch((0, _browserCore.createHttpRequest)(endpointUrl, configuration.batchBytesLimit, reportError), configuration.batchMessagesLimit, configuration.batchBytesLimit, configuration.messageBytesLimit, configuration.flushTimeout,
|
|
25
|
+
return new _browserCore.Batch((0, _browserCore.createHttpRequest)(endpointUrl, configuration.batchBytesLimit, reportError), configuration.batchMessagesLimit, configuration.batchBytesLimit, configuration.messageBytesLimit, configuration.flushTimeout, pageExitObservable);
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
return {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _sessionReplayConstants = require("./sessionReplayConstants");
|
|
8
|
+
|
|
9
|
+
Object.keys(_sessionReplayConstants).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _sessionReplayConstants[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _sessionReplayConstants[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RecordType = exports.NodeType = exports.MouseInteractionType = exports.MediaInteractionType = exports.IncrementalSource = void 0;
|
|
7
|
+
var RecordType = {
|
|
8
|
+
FullSnapshot: 2,
|
|
9
|
+
IncrementalSnapshot: 3,
|
|
10
|
+
Meta: 4,
|
|
11
|
+
Focus: 6,
|
|
12
|
+
ViewEnd: 7,
|
|
13
|
+
VisualViewport: 8,
|
|
14
|
+
FrustrationRecord: 9
|
|
15
|
+
};
|
|
16
|
+
exports.RecordType = RecordType;
|
|
17
|
+
var NodeType = {
|
|
18
|
+
Document: 0,
|
|
19
|
+
DocumentType: 1,
|
|
20
|
+
Element: 2,
|
|
21
|
+
Text: 3,
|
|
22
|
+
CDATA: 4,
|
|
23
|
+
DocumentFragment: 11
|
|
24
|
+
};
|
|
25
|
+
exports.NodeType = NodeType;
|
|
26
|
+
var IncrementalSource = {
|
|
27
|
+
Mutation: 0,
|
|
28
|
+
MouseMove: 1,
|
|
29
|
+
MouseInteraction: 2,
|
|
30
|
+
Scroll: 3,
|
|
31
|
+
ViewportResize: 4,
|
|
32
|
+
Input: 5,
|
|
33
|
+
TouchMove: 6,
|
|
34
|
+
MediaInteraction: 7,
|
|
35
|
+
StyleSheetRule: 8 // CanvasMutation : 9,
|
|
36
|
+
// Font : 10,
|
|
37
|
+
|
|
38
|
+
};
|
|
39
|
+
exports.IncrementalSource = IncrementalSource;
|
|
40
|
+
var MouseInteractionType = {
|
|
41
|
+
MouseUp: 0,
|
|
42
|
+
MouseDown: 1,
|
|
43
|
+
Click: 2,
|
|
44
|
+
ContextMenu: 3,
|
|
45
|
+
DblClick: 4,
|
|
46
|
+
Focus: 5,
|
|
47
|
+
Blur: 6,
|
|
48
|
+
TouchStart: 7,
|
|
49
|
+
TouchEnd: 9
|
|
50
|
+
};
|
|
51
|
+
exports.MouseInteractionType = MouseInteractionType;
|
|
52
|
+
var MediaInteractionType = {
|
|
53
|
+
Play: 0,
|
|
54
|
+
Pause: 1
|
|
55
|
+
};
|
|
56
|
+
exports.MediaInteractionType = MediaInteractionType;
|
package/esm/boot/buildEnv.js
CHANGED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { noop, runOnReadyState, LifeCycleEventType } from '@cloudcare/browser-core';
|
|
2
|
+
import { getReplayStats } from '../domain/replay/replayStats';
|
|
3
|
+
import { startDeflateWorker } from '../domain/replay/segmentCollection';
|
|
4
|
+
var RecorderStatus = {
|
|
5
|
+
// The recorder is stopped.
|
|
6
|
+
Stopped: 0,
|
|
7
|
+
// The user started the recording while it wasn't possible yet. The recorder should start as soon
|
|
8
|
+
// as possible.
|
|
9
|
+
IntentToStart: 1,
|
|
10
|
+
// The recorder is starting. It does not record anything yet.
|
|
11
|
+
Starting: 2,
|
|
12
|
+
// The recorder is started, it records the session.
|
|
13
|
+
Started: 3
|
|
14
|
+
};
|
|
15
|
+
export function makeRecorderApi(startRecordingImpl, startDeflateWorkerImpl) {
|
|
16
|
+
if (typeof startDeflateWorkerImpl === 'undefined') {
|
|
17
|
+
startDeflateWorkerImpl = startDeflateWorker;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (!isBrowserSupported()) {
|
|
21
|
+
return {
|
|
22
|
+
start: noop,
|
|
23
|
+
stop: noop,
|
|
24
|
+
getReplayStats: function getReplayStats() {
|
|
25
|
+
return undefined;
|
|
26
|
+
},
|
|
27
|
+
onRumStart: noop,
|
|
28
|
+
isRecording: function isRecording() {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var state = {
|
|
35
|
+
status: RecorderStatus.Stopped
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var startStrategy = function startStrategy() {
|
|
39
|
+
state = {
|
|
40
|
+
status: RecorderStatus.IntentToStart
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var stopStrategy = function stopStrategy() {
|
|
45
|
+
state = {
|
|
46
|
+
status: RecorderStatus.Stopped
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
start: function start() {
|
|
52
|
+
startStrategy();
|
|
53
|
+
},
|
|
54
|
+
stop: function stop() {
|
|
55
|
+
stopStrategy();
|
|
56
|
+
},
|
|
57
|
+
getReplayStats: getReplayStats,
|
|
58
|
+
onRumStart: function onRumStart(lifeCycle, configuration, sessionManager, viewContexts) {
|
|
59
|
+
lifeCycle.subscribe(LifeCycleEventType.SESSION_EXPIRED, function () {
|
|
60
|
+
if (state.status === RecorderStatus.Starting || state.status === RecorderStatus.Started) {
|
|
61
|
+
stopStrategy();
|
|
62
|
+
state = {
|
|
63
|
+
status: RecorderStatus.IntentToStart
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
lifeCycle.subscribe(LifeCycleEventType.SESSION_RENEWED, function () {
|
|
68
|
+
if (state.status === RecorderStatus.IntentToStart) {
|
|
69
|
+
startStrategy();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
startStrategy = function startStrategy() {
|
|
74
|
+
var session = sessionManager.findTrackedSession();
|
|
75
|
+
|
|
76
|
+
if (!session || !session.sessionReplayAllowed) {
|
|
77
|
+
state = {
|
|
78
|
+
status: RecorderStatus.IntentToStart
|
|
79
|
+
};
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (state.status === RecorderStatus.Starting || state.status === RecorderStatus.Started) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
state = {
|
|
88
|
+
status: RecorderStatus.Starting
|
|
89
|
+
};
|
|
90
|
+
runOnReadyState('interactive', function () {
|
|
91
|
+
if (state.status !== RecorderStatus.Starting) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
startDeflateWorkerImpl(function (worker) {
|
|
96
|
+
if (state.status !== RecorderStatus.Starting) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (!worker) {
|
|
101
|
+
state = {
|
|
102
|
+
status: RecorderStatus.Stopped
|
|
103
|
+
};
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
var recordingImpl = startRecordingImpl(lifeCycle, configuration, sessionManager, viewContexts, worker);
|
|
108
|
+
state = {
|
|
109
|
+
status: RecorderStatus.Started,
|
|
110
|
+
stopRecording: recordingImpl.stop
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
stopStrategy = function stopStrategy() {
|
|
117
|
+
if (state.status === RecorderStatus.Stopped) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (state.status === RecorderStatus.Started) {
|
|
122
|
+
state.stopRecording();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
state = {
|
|
126
|
+
status: RecorderStatus.Stopped
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
if (state.status === RecorderStatus.IntentToStart) {
|
|
131
|
+
startStrategy();
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
isRecording: function isRecording() {
|
|
135
|
+
return state.status === RecorderStatus.Started;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Test for Browser features used while recording
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
function isBrowserSupported() {
|
|
144
|
+
return (// Array.from is a bit less supported by browsers than CSSSupportsRule, but has higher chances
|
|
145
|
+
// to be polyfilled. Test for both to be more confident. We could add more things if we find out
|
|
146
|
+
// this test is not sufficient.
|
|
147
|
+
typeof Array.from === 'function' && typeof CSSSupportsRule === 'function' && 'forEach' in NodeList.prototype
|
|
148
|
+
);
|
|
149
|
+
}
|
package/esm/boot/rum.entry.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineGlobal, getGlobalObject } from '@cloudcare/browser-core';
|
|
2
2
|
import { startRum } from './rum';
|
|
3
3
|
import { makeRumPublicApi } from './rumPublicApi';
|
|
4
|
-
|
|
4
|
+
import { startRecording } from './startRecording';
|
|
5
|
+
import { makeRecorderApi } from './recorderApi';
|
|
6
|
+
var recorderApi = makeRecorderApi(startRecording);
|
|
7
|
+
export var datafluxRum = makeRumPublicApi(startRum, recorderApi);
|
|
5
8
|
defineGlobal(getGlobalObject(), 'DATAFLUX_RUM', datafluxRum);
|
package/esm/boot/rum.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { startRumSessionManager } from '../domain/rumSessionManager';
|
|
2
2
|
import { startCacheUsrCache } from '../domain/usr';
|
|
3
|
-
import { LifeCycle, LifeCycleEventType } from '@cloudcare/browser-core';
|
|
3
|
+
import { LifeCycle, LifeCycleEventType, createPageExitObservable } from '@cloudcare/browser-core';
|
|
4
4
|
import { startPerformanceCollection } from '../domain/performanceCollection';
|
|
5
5
|
import { createDOMMutationObservable } from '../domain/domMutationCollection';
|
|
6
6
|
import { createLocationChangeObservable } from '../domain/locationChangeObservable';
|
|
@@ -9,13 +9,14 @@ import { startActionCollection } from '../domain/rumEventsCollection/actions/act
|
|
|
9
9
|
import { startRumBatch } from '../transport/startRumBatch';
|
|
10
10
|
import { startRumAssembly } from '../domain/assembly';
|
|
11
11
|
import { startInternalContext } from '../domain/contexts/internalContext';
|
|
12
|
+
import { startForegroundContexts } from '../domain/contexts/foregroundContexts';
|
|
12
13
|
import { startUrlContexts } from '../domain/contexts/urlContexts';
|
|
13
14
|
import { startViewContexts } from '../domain/contexts/viewContexts';
|
|
14
15
|
import { startErrorCollection } from '../domain/rumEventsCollection/error/errorCollection';
|
|
15
16
|
import { startViewCollection } from '../domain/rumEventsCollection/view/viewCollection';
|
|
16
17
|
import { startRequestCollection } from '../domain/requestCollection';
|
|
17
18
|
import { startResourceCollection } from '../domain/rumEventsCollection/resource/resourceCollection';
|
|
18
|
-
export function startRum(configuration, getCommonContext, initialViewOptions) {
|
|
19
|
+
export function startRum(configuration, getCommonContext, recorderApi, initialViewOptions) {
|
|
19
20
|
var lifeCycle = new LifeCycle();
|
|
20
21
|
|
|
21
22
|
var reportError = function reportError(error) {
|
|
@@ -24,7 +25,11 @@ export function startRum(configuration, getCommonContext, initialViewOptions) {
|
|
|
24
25
|
});
|
|
25
26
|
};
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
var pageExitObservable = createPageExitObservable();
|
|
29
|
+
pageExitObservable.subscribe(function (event) {
|
|
30
|
+
lifeCycle.notify(LifeCycleEventType.PAGE_EXITED, event);
|
|
31
|
+
});
|
|
32
|
+
startRumBatch(configuration, lifeCycle, reportError, pageExitObservable);
|
|
28
33
|
var session = startRumSessionManager(configuration, lifeCycle);
|
|
29
34
|
var userSession = startCacheUsrCache(configuration);
|
|
30
35
|
var domMutationObservable = createDOMMutationObservable();
|
|
@@ -35,15 +40,16 @@ export function startRum(configuration, getCommonContext, initialViewOptions) {
|
|
|
35
40
|
var viewContexts = _startRumEventCollection.viewContexts;
|
|
36
41
|
var urlContexts = _startRumEventCollection.urlContexts;
|
|
37
42
|
var actionContexts = _startRumEventCollection.actionContexts;
|
|
43
|
+
var foregroundContexts = _startRumEventCollection.foregroundContexts;
|
|
38
44
|
startLongTaskCollection(lifeCycle, session);
|
|
39
45
|
startResourceCollection(lifeCycle, configuration);
|
|
40
46
|
|
|
41
|
-
var _startViewCollection = startViewCollection(lifeCycle, configuration, location, domMutationObservable, locationChangeObservable, initialViewOptions);
|
|
47
|
+
var _startViewCollection = startViewCollection(lifeCycle, configuration, location, domMutationObservable, locationChangeObservable, foregroundContexts, recorderApi, initialViewOptions);
|
|
42
48
|
|
|
43
49
|
var addTiming = _startViewCollection.addTiming;
|
|
44
50
|
var startView = _startViewCollection.startView;
|
|
45
51
|
|
|
46
|
-
var _startErrorCollection = startErrorCollection(lifeCycle,
|
|
52
|
+
var _startErrorCollection = startErrorCollection(lifeCycle, foregroundContexts);
|
|
47
53
|
|
|
48
54
|
var addError = _startErrorCollection.addError;
|
|
49
55
|
startRequestCollection(lifeCycle, configuration, session);
|
|
@@ -64,18 +70,21 @@ export function startRum(configuration, getCommonContext, initialViewOptions) {
|
|
|
64
70
|
export function startRumEventCollection(location, lifeCycle, configuration, sessionManager, userSessionManager, locationChangeObservable, domMutationObservable, getCommonContext, reportError) {
|
|
65
71
|
var viewContexts = startViewContexts(lifeCycle);
|
|
66
72
|
var urlContexts = startUrlContexts(lifeCycle, locationChangeObservable, location);
|
|
73
|
+
var foregroundContexts = startForegroundContexts();
|
|
67
74
|
|
|
68
|
-
var _startActionCollection = startActionCollection(lifeCycle, domMutationObservable, configuration);
|
|
75
|
+
var _startActionCollection = startActionCollection(lifeCycle, domMutationObservable, configuration, foregroundContexts);
|
|
69
76
|
|
|
70
77
|
var actionContexts = _startActionCollection.actionContexts;
|
|
71
78
|
startRumAssembly(configuration, lifeCycle, sessionManager, userSessionManager, viewContexts, urlContexts, actionContexts, getCommonContext, reportError);
|
|
72
79
|
return {
|
|
73
80
|
viewContexts: viewContexts,
|
|
74
81
|
urlContexts: urlContexts,
|
|
82
|
+
foregroundContexts: foregroundContexts,
|
|
75
83
|
addAction: _startActionCollection.addAction,
|
|
76
84
|
actionContexts: actionContexts,
|
|
77
85
|
stop: function stop() {
|
|
78
86
|
viewContexts.stop();
|
|
87
|
+
foregroundContexts.stop();
|
|
79
88
|
}
|
|
80
89
|
};
|
|
81
90
|
}
|
package/esm/boot/rumPublicApi.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makePublicApi, assign, areCookiesAuthorized, BoundedBuffer, display, buildCookieOptions, createContextManager, clocksNow, timeStampNow, ActionType, deepClone, createHandlingStack } from '@cloudcare/browser-core';
|
|
2
2
|
import { validateAndBuildRumConfiguration } from '../domain/configuration';
|
|
3
|
-
export function makeRumPublicApi(startRumImpl) {
|
|
3
|
+
export function makeRumPublicApi(startRumImpl, recorderApi) {
|
|
4
4
|
var isAlreadyInitialized = false;
|
|
5
5
|
var globalContextManager = createContextManager();
|
|
6
6
|
var userContextManager = createContextManager();
|
|
@@ -102,15 +102,17 @@ export function makeRumPublicApi(startRumImpl) {
|
|
|
102
102
|
var startRumResults = startRumImpl(configuration, function () {
|
|
103
103
|
return {
|
|
104
104
|
user: userContextManager.getContext(),
|
|
105
|
-
context: globalContextManager.getContext()
|
|
105
|
+
context: globalContextManager.getContext(),
|
|
106
|
+
hasReplay: recorderApi.isRecording() ? true : undefined
|
|
106
107
|
};
|
|
107
|
-
}, initialViewOptions);
|
|
108
|
+
}, recorderApi, initialViewOptions);
|
|
108
109
|
_startViewStrategy = startRumResults.startView;
|
|
109
110
|
_addActionStrategy = startRumResults.addAction;
|
|
110
111
|
_addErrorStrategy = startRumResults.addError;
|
|
111
112
|
_addTimingStrategy = startRumResults.addTiming;
|
|
112
113
|
getInternalContextStrategy = startRumResults.getInternalContext;
|
|
113
114
|
bufferApiCalls.drain();
|
|
115
|
+
recorderApi.onRumStart(startRumResults.lifeCycle, configuration, startRumResults.session, startRumResults.viewContexts);
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
var startView = function startView(options) {
|
|
@@ -196,7 +198,9 @@ export function makeRumPublicApi(startRumImpl) {
|
|
|
196
198
|
/** @deprecated: renamed to clearUser */
|
|
197
199
|
removeUser: userContextManager.clearContext,
|
|
198
200
|
clearUser: userContextManager.clearContext,
|
|
199
|
-
startView: startView
|
|
201
|
+
startView: startView,
|
|
202
|
+
startSessionReplayRecording: recorderApi.start,
|
|
203
|
+
stopSessionReplayRecording: recorderApi.stop
|
|
200
204
|
});
|
|
201
205
|
return rumPublicApi;
|
|
202
206
|
|