@cloudcare/browser-rum 3.3.1 → 3.3.3
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/perStartRum.js +11 -7
- package/cjs/boot/perStartRum.js.map +1 -1
- package/cjs/boot/recorderApi.js +2 -49
- package/cjs/boot/recorderApi.js.map +1 -1
- package/cjs/boot/recorderApiStub.js +53 -0
- package/cjs/boot/recorderApiStub.js.map +1 -0
- package/cjs/boot/rum.entry.js +6 -7
- package/cjs/boot/rum.entry.js.map +1 -1
- package/cjs/boot/rum.slim.entry.js +13 -0
- package/cjs/boot/rum.slim.entry.js.map +1 -0
- package/cjs/boot/rumEntryFactory.js +15 -0
- package/cjs/boot/rumEntryFactory.js.map +1 -0
- package/cjs/boot/rumPublicApi.js +8 -57
- package/cjs/boot/rumPublicApi.js.map +1 -1
- package/cjs/boot/rumRecorderApiStub.js +19 -0
- package/cjs/boot/rumRecorderApiStub.js.map +1 -0
- package/cjs/boot/rumSlimConfiguration.js +16 -0
- package/cjs/boot/rumSlimConfiguration.js.map +1 -0
- package/cjs/boot/sessionReplayPublicApi.js +62 -0
- package/cjs/boot/sessionReplayPublicApi.js.map +1 -0
- package/cjs/domain/deflate/deflateEncoder.js +2 -4
- package/cjs/domain/deflate/deflateEncoder.js.map +1 -1
- package/cjs/domain/deflate/deflateWorker.js +1 -1
- package/cjs/domain/encoderStreamId.js +11 -0
- package/cjs/domain/encoderStreamId.js.map +1 -0
- package/cjs/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/cjs/transport/startRumBatch.js +2 -2
- package/cjs/transport/startRumBatch.js.map +1 -1
- package/esm/boot/buildEnv.js +1 -1
- package/esm/boot/perStartRum.js +11 -7
- package/esm/boot/perStartRum.js.map +1 -1
- package/esm/boot/recorderApi.js +2 -49
- package/esm/boot/recorderApi.js.map +1 -1
- package/esm/boot/recorderApiStub.js +47 -0
- package/esm/boot/recorderApiStub.js.map +1 -0
- package/esm/boot/rum.entry.js +6 -7
- package/esm/boot/rum.entry.js.map +1 -1
- package/esm/boot/rum.slim.entry.js +7 -0
- package/esm/boot/rum.slim.entry.js.map +1 -0
- package/esm/boot/rumEntryFactory.js +9 -0
- package/esm/boot/rumEntryFactory.js.map +1 -0
- package/esm/boot/rumPublicApi.js +8 -57
- package/esm/boot/rumPublicApi.js.map +1 -1
- package/esm/boot/rumRecorderApiStub.js +13 -0
- package/esm/boot/rumRecorderApiStub.js.map +1 -0
- package/esm/boot/rumSlimConfiguration.js +10 -0
- package/esm/boot/rumSlimConfiguration.js.map +1 -0
- package/esm/boot/sessionReplayPublicApi.js +56 -0
- package/esm/boot/sessionReplayPublicApi.js.map +1 -0
- package/esm/domain/deflate/deflateEncoder.js +2 -4
- package/esm/domain/deflate/deflateEncoder.js.map +1 -1
- package/esm/domain/deflate/deflateWorker.js +1 -1
- package/esm/domain/encoderStreamId.js +5 -0
- package/esm/domain/encoderStreamId.js.map +1 -0
- package/esm/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/esm/transport/startRumBatch.js +2 -2
- package/esm/transport/startRumBatch.js.map +1 -1
- package/package.json +2 -2
- package/src/boot/perStartRum.js +11 -7
- package/src/boot/recorderApi.js +2 -49
- package/src/boot/recorderApiStub.js +47 -0
- package/src/boot/rum.entry.js +6 -8
- package/src/boot/rum.slim.entry.js +7 -0
- package/src/boot/rumEntryFactory.js +10 -0
- package/src/boot/rumPublicApi.js +14 -57
- package/src/boot/rumRecorderApiStub.js +14 -0
- package/src/boot/rumSlimConfiguration.js +11 -0
- package/src/boot/sessionReplayPublicApi.js +57 -0
- package/src/domain/deflate/deflateEncoder.js +2 -4
- package/src/domain/encoderStreamId.js +5 -0
- package/src/transport/startRumBatch.js +2 -2
package/src/boot/rumPublicApi.js
CHANGED
|
@@ -60,7 +60,7 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
60
60
|
resourceTrackerManager: resourceTrackerManager
|
|
61
61
|
}),
|
|
62
62
|
getCommonContext,
|
|
63
|
-
function (configuration,
|
|
63
|
+
function (configuration, compressionWorker, initialViewOptions) {
|
|
64
64
|
if (configuration.storeContextsToLocal) {
|
|
65
65
|
storeContextManager(
|
|
66
66
|
configuration,
|
|
@@ -76,7 +76,7 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
78
|
customerDataTrackerManager.setCompressionStatus(
|
|
79
|
-
|
|
79
|
+
compressionWorker
|
|
80
80
|
? CustomerDataCompressionStatus.Enabled
|
|
81
81
|
: CustomerDataCompressionStatus.Disabled
|
|
82
82
|
)
|
|
@@ -86,9 +86,12 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
86
86
|
customerDataTrackerManager,
|
|
87
87
|
getCommonContext,
|
|
88
88
|
initialViewOptions,
|
|
89
|
-
|
|
89
|
+
compressionWorker && options.createCompressionEncoder
|
|
90
90
|
? function (streamId) {
|
|
91
|
-
return options.
|
|
91
|
+
return options.createCompressionEncoder(
|
|
92
|
+
compressionWorker,
|
|
93
|
+
streamId
|
|
94
|
+
)
|
|
92
95
|
}
|
|
93
96
|
: createIdentityEncoder,
|
|
94
97
|
resourceTrackerManager
|
|
@@ -98,7 +101,7 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
98
101
|
configuration,
|
|
99
102
|
startRumResult.session,
|
|
100
103
|
startRumResult.viewContexts,
|
|
101
|
-
|
|
104
|
+
compressionWorker
|
|
102
105
|
)
|
|
103
106
|
|
|
104
107
|
strategy = createPostStartStrategy(strategy, startRumResult)
|
|
@@ -119,7 +122,11 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
119
122
|
addTelemetryUsage({ feature: 'start-view' })
|
|
120
123
|
})
|
|
121
124
|
|
|
122
|
-
|
|
125
|
+
const recorderPublicApi = options.makeRecorderPublicApi
|
|
126
|
+
? options.makeRecorderPublicApi(recorderApi)
|
|
127
|
+
: {}
|
|
128
|
+
|
|
129
|
+
var rumPublicApi = makePublicApi(assign({
|
|
123
130
|
init: monitor(function (initConfiguration) {
|
|
124
131
|
strategy.init(initConfiguration)
|
|
125
132
|
}),
|
|
@@ -286,56 +293,6 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
286
293
|
strategy.setForcedSession()
|
|
287
294
|
addTelemetryUsage({ feature: 'set-forced-session' })
|
|
288
295
|
}),
|
|
289
|
-
startSessionReplayRecording: monitor(function (options) {
|
|
290
|
-
recorderApi.start(options)
|
|
291
|
-
addTelemetryUsage({
|
|
292
|
-
feature: 'start-session-replay-recording',
|
|
293
|
-
force: options && options.force
|
|
294
|
-
})
|
|
295
|
-
}),
|
|
296
|
-
isRecording: monitor(function () {
|
|
297
|
-
return recorderApi.isRecording()
|
|
298
|
-
}),
|
|
299
|
-
stopSessionReplayRecording: monitor(recorderApi.stop),
|
|
300
|
-
takeSubsequentFullSnapshot: monitor(recorderApi.takeSubsequentFullSnapshot),
|
|
301
|
-
snapshotCanvas: monitor(function (canvas, options) {
|
|
302
|
-
return recorderApi.snapshotCanvas(canvas, options)
|
|
303
|
-
}),
|
|
304
|
-
getSerializedNodeIdForDebug: monitor(function (node) {
|
|
305
|
-
return recorderApi.getSerializedNodeIdForDebug(node)
|
|
306
|
-
}),
|
|
307
|
-
getLastAutoCanvasSnapshotResultForDebug: monitor(function () {
|
|
308
|
-
return recorderApi.getLastAutoCanvasSnapshotResultForDebug()
|
|
309
|
-
}),
|
|
310
|
-
getAutoCanvasSnapshotDebugHistoryForDebug: monitor(function () {
|
|
311
|
-
return recorderApi.getAutoCanvasSnapshotDebugHistoryForDebug()
|
|
312
|
-
}),
|
|
313
|
-
getLastCanvasMutationForDebug: monitor(function () {
|
|
314
|
-
return recorderApi.getLastCanvasMutationForDebug()
|
|
315
|
-
}),
|
|
316
|
-
getCanvasMutationHistoryForDebug: monitor(function () {
|
|
317
|
-
return recorderApi.getCanvasMutationHistoryForDebug()
|
|
318
|
-
}),
|
|
319
|
-
getLastDomMutationForDebug: monitor(function () {
|
|
320
|
-
return recorderApi.getLastDomMutationForDebug()
|
|
321
|
-
}),
|
|
322
|
-
getDomMutationHistoryForDebug: monitor(function () {
|
|
323
|
-
return recorderApi.getDomMutationHistoryForDebug()
|
|
324
|
-
}),
|
|
325
|
-
getLastReplaySegmentFlushForDebug: monitor(function () {
|
|
326
|
-
return recorderApi.getLastReplaySegmentFlushForDebug()
|
|
327
|
-
}),
|
|
328
|
-
getReplaySegmentFlushHistoryForDebug: monitor(function () {
|
|
329
|
-
return recorderApi.getReplaySegmentFlushHistoryForDebug()
|
|
330
|
-
}),
|
|
331
|
-
getReplayPerformanceForDebug: monitor(function () {
|
|
332
|
-
return recorderApi.getReplayPerformanceForDebug()
|
|
333
|
-
}),
|
|
334
|
-
flushReplayMutationsForDebug: monitor(function () {
|
|
335
|
-
if (recorderApi.flushReplayMutationsForDebug) {
|
|
336
|
-
recorderApi.flushReplayMutationsForDebug()
|
|
337
|
-
}
|
|
338
|
-
}),
|
|
339
296
|
createResourceTrackerId: monitor(function () {
|
|
340
297
|
return resourceTrackerManager.createTrackerId()
|
|
341
298
|
}),
|
|
@@ -357,7 +314,7 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
357
314
|
getResource: monitor(function (trackerId) {
|
|
358
315
|
return resourceTrackerManager.getResource(trackerId)
|
|
359
316
|
})
|
|
360
|
-
})
|
|
317
|
+
}, recorderPublicApi))
|
|
361
318
|
return rumPublicApi
|
|
362
319
|
}
|
|
363
320
|
function createPostStartStrategy(preStartStrategy, startRumResult) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { assign } from '@cloudcare/browser-core'
|
|
2
|
+
|
|
3
|
+
export function forceRumSlimConfiguration(initConfiguration) {
|
|
4
|
+
return assign({}, initConfiguration, {
|
|
5
|
+
sessionReplaySampleRate: 0,
|
|
6
|
+
sessionReplayOnErrorSampleRate: 0,
|
|
7
|
+
replayCanvasEnabled: false,
|
|
8
|
+
compressIntakeRequests: false
|
|
9
|
+
})
|
|
10
|
+
}
|
|
11
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { addTelemetryUsage, monitor } from '@cloudcare/browser-core'
|
|
2
|
+
|
|
3
|
+
export function makeSessionReplayPublicApi(recorderApi) {
|
|
4
|
+
return {
|
|
5
|
+
startSessionReplayRecording: monitor(function (options) {
|
|
6
|
+
recorderApi.start(options)
|
|
7
|
+
addTelemetryUsage({
|
|
8
|
+
feature: 'start-session-replay-recording',
|
|
9
|
+
force: options && options.force
|
|
10
|
+
})
|
|
11
|
+
}),
|
|
12
|
+
isRecording: monitor(function () {
|
|
13
|
+
return recorderApi.isRecording()
|
|
14
|
+
}),
|
|
15
|
+
stopSessionReplayRecording: monitor(recorderApi.stop),
|
|
16
|
+
takeSubsequentFullSnapshot: monitor(recorderApi.takeSubsequentFullSnapshot),
|
|
17
|
+
snapshotCanvas: monitor(function (canvas, options) {
|
|
18
|
+
return recorderApi.snapshotCanvas(canvas, options)
|
|
19
|
+
}),
|
|
20
|
+
getSerializedNodeIdForDebug: monitor(function (node) {
|
|
21
|
+
return recorderApi.getSerializedNodeIdForDebug(node)
|
|
22
|
+
}),
|
|
23
|
+
getLastAutoCanvasSnapshotResultForDebug: monitor(function () {
|
|
24
|
+
return recorderApi.getLastAutoCanvasSnapshotResultForDebug()
|
|
25
|
+
}),
|
|
26
|
+
getAutoCanvasSnapshotDebugHistoryForDebug: monitor(function () {
|
|
27
|
+
return recorderApi.getAutoCanvasSnapshotDebugHistoryForDebug()
|
|
28
|
+
}),
|
|
29
|
+
getLastCanvasMutationForDebug: monitor(function () {
|
|
30
|
+
return recorderApi.getLastCanvasMutationForDebug()
|
|
31
|
+
}),
|
|
32
|
+
getCanvasMutationHistoryForDebug: monitor(function () {
|
|
33
|
+
return recorderApi.getCanvasMutationHistoryForDebug()
|
|
34
|
+
}),
|
|
35
|
+
getLastDomMutationForDebug: monitor(function () {
|
|
36
|
+
return recorderApi.getLastDomMutationForDebug()
|
|
37
|
+
}),
|
|
38
|
+
getDomMutationHistoryForDebug: monitor(function () {
|
|
39
|
+
return recorderApi.getDomMutationHistoryForDebug()
|
|
40
|
+
}),
|
|
41
|
+
getLastReplaySegmentFlushForDebug: monitor(function () {
|
|
42
|
+
return recorderApi.getLastReplaySegmentFlushForDebug()
|
|
43
|
+
}),
|
|
44
|
+
getReplaySegmentFlushHistoryForDebug: monitor(function () {
|
|
45
|
+
return recorderApi.getReplaySegmentFlushHistoryForDebug()
|
|
46
|
+
}),
|
|
47
|
+
getReplayPerformanceForDebug: monitor(function () {
|
|
48
|
+
return recorderApi.getReplayPerformanceForDebug()
|
|
49
|
+
}),
|
|
50
|
+
flushReplayMutationsForDebug: monitor(function () {
|
|
51
|
+
if (recorderApi.flushReplayMutationsForDebug) {
|
|
52
|
+
recorderApi.flushReplayMutationsForDebug()
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -4,10 +4,8 @@ import {
|
|
|
4
4
|
addTelemetryDebug,
|
|
5
5
|
assign
|
|
6
6
|
} from '@cloudcare/browser-core'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
RUM: 2
|
|
10
|
-
}
|
|
7
|
+
import { EncoderStreamId } from '../encoderStreamId'
|
|
8
|
+
export var DeflateEncoderStreamId = EncoderStreamId
|
|
11
9
|
export function createDeflateEncoder(worker, streamId) {
|
|
12
10
|
var rawBytesCount = 0
|
|
13
11
|
var compressedData = []
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
RumEventType,
|
|
4
4
|
startBatchWithReplica
|
|
5
5
|
} from '@cloudcare/browser-core'
|
|
6
|
-
import {
|
|
6
|
+
import { EncoderStreamId } from '../domain/encoderStreamId'
|
|
7
7
|
export function startRumBatch(
|
|
8
8
|
configuration,
|
|
9
9
|
lifeCycle,
|
|
@@ -17,7 +17,7 @@ export function startRumBatch(
|
|
|
17
17
|
configuration,
|
|
18
18
|
{
|
|
19
19
|
endpoint: configuration.rumEndpoint,
|
|
20
|
-
encoder: createEncoder(
|
|
20
|
+
encoder: createEncoder(EncoderStreamId.RUM)
|
|
21
21
|
},
|
|
22
22
|
reportError,
|
|
23
23
|
pageExitObservable,
|