@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.
@@ -104,14 +104,14 @@ function processRequest(
104
104
  startClocks,
105
105
  request.duration
106
106
  )
107
- var pageStateInfo = computePageStateInfo(
108
- pageStateHistory,
109
- startClocks,
110
- isNullUndefinedDefaultValue(
111
- matchingTiming && matchingTiming.duration,
112
- request.duration
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
- pageStateHistory,
183
- startClocks,
184
- entry.duration
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
- return {
248
- _gc: {
249
- page_states: pageStateHistory.findAll(startClocks.relative, duration),
250
- page_was_discarded: String(document.wasDiscarded)
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
- const requestCrosseds = pageStateHistory.findAll(
253
+ return !pageStateHistory.wasInPageStateDuringPeriod(
254
+ PageState.FROZEN,
256
255
  startClocks.relative,
257
256
  duration
258
257
  )
259
- var requestCrossedFrozenState
260
- if (requestCrosseds) {
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