@cloudcare/browser-rum 3.1.17 → 3.1.19
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/rumPublicApi.js +21 -7
- package/cjs/boot/rumPublicApi.js.map +1 -1
- package/cjs/domain/contexts/urlContexts.js +3 -6
- package/cjs/domain/contexts/urlContexts.js.map +1 -1
- package/cjs/domain/replay/deflate/deflateWorker.js +1 -1
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js +25 -20
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
- package/esm/boot/buildEnv.js +1 -1
- package/esm/boot/rumPublicApi.js +22 -8
- package/esm/boot/rumPublicApi.js.map +1 -1
- package/esm/domain/contexts/urlContexts.js +3 -6
- package/esm/domain/contexts/urlContexts.js.map +1 -1
- package/esm/domain/replay/deflate/deflateWorker.js +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js +25 -20
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
- package/package.json +4 -4
- package/src/boot/rumPublicApi.js +25 -14
- package/src/domain/contexts/urlContexts.js +7 -13
- package/src/domain/rumEventsCollection/resource/resourceCollection.js +27 -33
|
@@ -104,14 +104,14 @@ function processRequest(
|
|
|
104
104
|
startClocks,
|
|
105
105
|
request.duration
|
|
106
106
|
)
|
|
107
|
-
var pageStateInfo = computePageStateInfo(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
)
|
|
107
|
+
// var pageStateInfo = computePageStateInfo(
|
|
108
|
+
// pageStateHistory,
|
|
109
|
+
// startClocks,
|
|
110
|
+
// isNullUndefinedDefaultValue(
|
|
111
|
+
// matchingTiming && matchingTiming.duration,
|
|
112
|
+
// request.duration
|
|
113
|
+
// )
|
|
114
|
+
// )
|
|
115
115
|
var urlObj = urlParse(request.url).getParse()
|
|
116
116
|
var resourceEvent = extend2Lev(
|
|
117
117
|
{
|
|
@@ -134,8 +134,7 @@ function processRequest(
|
|
|
134
134
|
type: RumEventType.RESOURCE
|
|
135
135
|
},
|
|
136
136
|
tracingInfo,
|
|
137
|
-
correspondingTimingOverrides
|
|
138
|
-
pageStateInfo
|
|
137
|
+
correspondingTimingOverrides
|
|
139
138
|
)
|
|
140
139
|
return {
|
|
141
140
|
startTime: startClocks.relative,
|
|
@@ -178,11 +177,11 @@ function processResourceEntry(
|
|
|
178
177
|
} else if (isCacheHit(entry)) {
|
|
179
178
|
statusCode = 200
|
|
180
179
|
}
|
|
181
|
-
var pageStateInfo = computePageStateInfo(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
)
|
|
180
|
+
// var pageStateInfo = computePageStateInfo(
|
|
181
|
+
// pageStateHistory,
|
|
182
|
+
// startClocks,
|
|
183
|
+
// entry.duration
|
|
184
|
+
// )
|
|
186
185
|
|
|
187
186
|
var resourceEvent = extend2Lev(
|
|
188
187
|
{
|
|
@@ -202,8 +201,7 @@ function processResourceEntry(
|
|
|
202
201
|
type: RumEventType.RESOURCE
|
|
203
202
|
},
|
|
204
203
|
tracingInfo,
|
|
205
|
-
entryMetrics
|
|
206
|
-
pageStateInfo
|
|
204
|
+
entryMetrics
|
|
207
205
|
)
|
|
208
206
|
return {
|
|
209
207
|
startTime: startClocks.relative,
|
|
@@ -243,26 +241,22 @@ function computeRequestTracingInfo(request) {
|
|
|
243
241
|
resource: { id: UUID() }
|
|
244
242
|
}
|
|
245
243
|
}
|
|
246
|
-
function computePageStateInfo(pageStateHistory, startClocks, duration) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
244
|
+
// function computePageStateInfo(pageStateHistory, startClocks, duration) {
|
|
245
|
+
// return {
|
|
246
|
+
// _gc: {
|
|
247
|
+
// page_states: pageStateHistory.findAll(startClocks.relative, duration),
|
|
248
|
+
// page_was_discarded: String(document.wasDiscarded)
|
|
249
|
+
// }
|
|
250
|
+
// }
|
|
251
|
+
// }
|
|
254
252
|
function computeRequestDuration(pageStateHistory, startClocks, duration) {
|
|
255
|
-
|
|
253
|
+
return !pageStateHistory.wasInPageStateDuringPeriod(
|
|
254
|
+
PageState.FROZEN,
|
|
256
255
|
startClocks.relative,
|
|
257
256
|
duration
|
|
258
257
|
)
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
requestCrossedFrozenState = some(requestCrosseds, function (pageState) {
|
|
262
|
-
return pageState.state === PageState.FROZEN
|
|
263
|
-
})
|
|
264
|
-
}
|
|
265
|
-
return !requestCrossedFrozenState ? toServerDuration(duration) : undefined
|
|
258
|
+
? toServerDuration(duration)
|
|
259
|
+
: undefined
|
|
266
260
|
}
|
|
267
261
|
function computeEntryTracingInfo(entry) {
|
|
268
262
|
return entry.traceId ? { _gc: { traceId: entry.traceId } } : undefined
|