@newrelic/browser-agent 1.292.1-rc.1 → 1.292.1-rc.2
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/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/features/page_view_event/aggregate/index.js +8 -0
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/features/page_view_event/aggregate/index.js +8 -0
- package/dist/types/features/page_view_event/aggregate/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/page_view_event/aggregate/index.js +8 -0
|
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.292.1-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.292.1-rc.2";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.292.1-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.292.1-rc.2";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -167,9 +167,17 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
try {
|
|
170
|
+
const wasReady = this.agentRef.runtime.timeKeeper.ready;
|
|
171
|
+
|
|
170
172
|
// will do nothing if already done
|
|
171
173
|
this.agentRef.runtime.timeKeeper.processRumRequest(xhr, this.rumStartTime, rumEndTime, app.nrServerTime);
|
|
172
174
|
if (!this.agentRef.runtime.timeKeeper.ready) throw new Error('TimeKeeper not ready');
|
|
175
|
+
|
|
176
|
+
// If timeKeeper's origin time is ahead of nrServerTime, then the timestamp is invalid. Report a supportability metric.
|
|
177
|
+
const timeDiff = this.agentRef.runtime.timeKeeper.correctedOriginTime - app.nrServerTime;
|
|
178
|
+
if (wasReady && timeDiff > 0) {
|
|
179
|
+
this.reportSupportabilityMetric('Generic/TimeKeeper/InvalidTimestamp/Seen', timeDiff);
|
|
180
|
+
}
|
|
173
181
|
} catch (error) {
|
|
174
182
|
this.ee.abort();
|
|
175
183
|
(0, _console.warn)(17, error);
|
|
@@ -158,9 +158,17 @@ export class Aggregate extends AggregateBase {
|
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
160
|
try {
|
|
161
|
+
const wasReady = this.agentRef.runtime.timeKeeper.ready;
|
|
162
|
+
|
|
161
163
|
// will do nothing if already done
|
|
162
164
|
this.agentRef.runtime.timeKeeper.processRumRequest(xhr, this.rumStartTime, rumEndTime, app.nrServerTime);
|
|
163
165
|
if (!this.agentRef.runtime.timeKeeper.ready) throw new Error('TimeKeeper not ready');
|
|
166
|
+
|
|
167
|
+
// If timeKeeper's origin time is ahead of nrServerTime, then the timestamp is invalid. Report a supportability metric.
|
|
168
|
+
const timeDiff = this.agentRef.runtime.timeKeeper.correctedOriginTime - app.nrServerTime;
|
|
169
|
+
if (wasReady && timeDiff > 0) {
|
|
170
|
+
this.reportSupportabilityMetric('Generic/TimeKeeper/InvalidTimestamp/Seen', timeDiff);
|
|
171
|
+
}
|
|
164
172
|
} catch (error) {
|
|
165
173
|
this.ee.abort();
|
|
166
174
|
warn(17, error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate/index.js"],"names":[],"mappings":"AAsBA;IACE,2BAA2C;IAC3C,2BA8BC;IA3BC,wBAAwB;IACxB,8BAA8B;IAC9B,8BAA8B;IA2BhC;;;;;OAKG;IACH,2BAHW,GAAC,WACD,GAAC,QAsEX;IAVC,iCAAyB;IAY3B;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate/index.js"],"names":[],"mappings":"AAsBA;IACE,2BAA2C;IAC3C,2BA8BC;IA3BC,wBAAwB;IACxB,8BAA8B;IAC9B,8BAA8B;IA2BhC;;;;;OAKG;IACH,2BAHW,GAAC,WACD,GAAC,QAsEX;IAVC,iCAAyB;IAY3B;;;;;aA6CC;IAED,qDAaC;CACF;8BArL6B,4BAA4B"}
|
package/package.json
CHANGED
|
@@ -152,9 +152,17 @@ export class Aggregate extends AggregateBase {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
try {
|
|
155
|
+
const wasReady = this.agentRef.runtime.timeKeeper.ready
|
|
156
|
+
|
|
155
157
|
// will do nothing if already done
|
|
156
158
|
this.agentRef.runtime.timeKeeper.processRumRequest(xhr, this.rumStartTime, rumEndTime, app.nrServerTime)
|
|
157
159
|
if (!this.agentRef.runtime.timeKeeper.ready) throw new Error('TimeKeeper not ready')
|
|
160
|
+
|
|
161
|
+
// If timeKeeper's origin time is ahead of nrServerTime, then the timestamp is invalid. Report a supportability metric.
|
|
162
|
+
const timeDiff = this.agentRef.runtime.timeKeeper.correctedOriginTime - app.nrServerTime
|
|
163
|
+
if (wasReady && timeDiff > 0) {
|
|
164
|
+
this.reportSupportabilityMetric('Generic/TimeKeeper/InvalidTimestamp/Seen', timeDiff)
|
|
165
|
+
}
|
|
158
166
|
} catch (error) {
|
|
159
167
|
this.ee.abort()
|
|
160
168
|
warn(17, error)
|