@newrelic/browser-agent 1.322.0-rc.6 → 1.322.0-rc.8
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/session_replay/aggregate/index.js +8 -3
- package/dist/cjs/features/session_trace/aggregate/index.js +6 -6
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/features/session_replay/aggregate/index.js +8 -3
- package/dist/esm/features/session_trace/aggregate/index.js +6 -6
- package/dist/types/features/session_replay/aggregate/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/session_replay/aggregate/index.js +6 -1
- package/src/features/session_trace/aggregate/index.js +6 -6
|
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.322.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.322.0-rc.8";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.322.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.322.0-rc.8";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -146,13 +146,18 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
146
146
|
}
|
|
147
147
|
switchToFull() {
|
|
148
148
|
if (!this.entitled || this.blocked) return;
|
|
149
|
+
const prevMode = this.mode;
|
|
149
150
|
this.mode = _constants2.MODE.FULL;
|
|
151
|
+
this.#writeToStorage({
|
|
152
|
+
sessionReplayMode: this.mode
|
|
153
|
+
});
|
|
154
|
+
|
|
150
155
|
// if the error was noticed AFTER the recorder was already imported....
|
|
151
156
|
if (this.recorder && this.initialized) {
|
|
157
|
+
if (prevMode === _constants2.MODE.ERROR) {
|
|
158
|
+
this.agentRef.runtime.harvester.triggerHarvestFor(this);
|
|
159
|
+
}
|
|
152
160
|
if (!this.agentRef.runtime.isRecording) this.recorder.startRecording(_constants.TRIGGERS.SWITCH_TO_FULL, this.mode); // off --> full
|
|
153
|
-
this.#writeToStorage({
|
|
154
|
-
sessionReplayMode: this.mode
|
|
155
|
-
});
|
|
156
161
|
} else {
|
|
157
162
|
this.initializeRecording(_constants2.MODE.FULL, true, _constants.TRIGGERS.SWITCH_TO_FULL);
|
|
158
163
|
}
|
|
@@ -90,12 +90,12 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
90
90
|
(0, _registerHandler.registerHandler)('bstApi', (...args) => this.traceStorage.storeNode(...args), this.featureName, this.ee);
|
|
91
91
|
(0, _registerHandler.registerHandler)('trace-jserror', (...args) => this.traceStorage.storeErrorAgg(...args), this.featureName, this.ee);
|
|
92
92
|
(0, _registerHandler.registerHandler)('pvtAdded', (...args) => this.traceStorage.processPVT(...args), this.featureName, this.ee);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
93
|
+
}
|
|
94
|
+
if (this.mode === _constants2.MODE.ERROR) {
|
|
95
|
+
/** A separate handler for noticing errors, and switching to "full" mode if running in "error" mode */
|
|
96
|
+
(0, _registerHandler.registerHandler)('trace-jserror', () => {
|
|
97
|
+
if (this.mode === _constants2.MODE.ERROR) this.switchToFull();
|
|
98
|
+
}, this.featureName, this.ee);
|
|
99
99
|
}
|
|
100
100
|
this.agentRef.runtime.session.write({
|
|
101
101
|
sessionTraceMode: this.mode
|
|
@@ -142,13 +142,18 @@ export class Aggregate extends AggregateBase {
|
|
|
142
142
|
}
|
|
143
143
|
switchToFull() {
|
|
144
144
|
if (!this.entitled || this.blocked) return;
|
|
145
|
+
const prevMode = this.mode;
|
|
145
146
|
this.mode = MODE.FULL;
|
|
147
|
+
this.#writeToStorage({
|
|
148
|
+
sessionReplayMode: this.mode
|
|
149
|
+
});
|
|
150
|
+
|
|
146
151
|
// if the error was noticed AFTER the recorder was already imported....
|
|
147
152
|
if (this.recorder && this.initialized) {
|
|
153
|
+
if (prevMode === MODE.ERROR) {
|
|
154
|
+
this.agentRef.runtime.harvester.triggerHarvestFor(this);
|
|
155
|
+
}
|
|
148
156
|
if (!this.agentRef.runtime.isRecording) this.recorder.startRecording(TRIGGERS.SWITCH_TO_FULL, this.mode); // off --> full
|
|
149
|
-
this.#writeToStorage({
|
|
150
|
-
sessionReplayMode: this.mode
|
|
151
|
-
});
|
|
152
157
|
} else {
|
|
153
158
|
this.initializeRecording(MODE.FULL, true, TRIGGERS.SWITCH_TO_FULL);
|
|
154
159
|
}
|
|
@@ -84,12 +84,12 @@ export class Aggregate extends AggregateBase {
|
|
|
84
84
|
registerHandler('bstApi', (...args) => this.traceStorage.storeNode(...args), this.featureName, this.ee);
|
|
85
85
|
registerHandler('trace-jserror', (...args) => this.traceStorage.storeErrorAgg(...args), this.featureName, this.ee);
|
|
86
86
|
registerHandler('pvtAdded', (...args) => this.traceStorage.processPVT(...args), this.featureName, this.ee);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
87
|
+
}
|
|
88
|
+
if (this.mode === MODE.ERROR) {
|
|
89
|
+
/** A separate handler for noticing errors, and switching to "full" mode if running in "error" mode */
|
|
90
|
+
registerHandler('trace-jserror', () => {
|
|
91
|
+
if (this.mode === MODE.ERROR) this.switchToFull();
|
|
92
|
+
}, this.featureName, this.ee);
|
|
93
93
|
}
|
|
94
94
|
this.agentRef.runtime.session.write({
|
|
95
95
|
sessionTraceMode: this.mode
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AA2BA;IACE,2BAAiC;IAIjC,sCA+FC;IAlGD,WAAW;IAOT,uBAA0D;IAE1D,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IACnB,+DAA+D;IAC/D,wBAA0B;IAE1B,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,qBAA2B;IAE3B,cAA8C;IAI9C,kCAAqG;IAqEvG,0BAEC;IAED,0BAMC;IAED,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AA2BA;IACE,2BAAiC;IAIjC,sCA+FC;IAlGD,WAAW;IAOT,uBAA0D;IAE1D,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IACnB,+DAA+D;IAC/D,wBAA0B;IAE1B,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,qBAA2B;IAE3B,cAA8C;IAI9C,kCAAqG;IAqEvG,0BAEC;IAED,0BAMC;IAED,qBAeC;IAED;;;;;;OAMG;IACH,4BALW,OAAO,iBACP,OAAO;;;;;;QAEL,IAAI,CA+ChB;IAED,2BAUC;IAED,0BA0CC;IAED;;;;OAIG;IACH,6BAHW,MAAM,EAAE,GACN;QAAE,UAAU,EAAE,MAAM,GAAC,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAA;KAAE,CAUzE;IAED;;;;;;;;;;MAsEC;IAED,sCAcC;IAED;;;;OAIG;IACH,mCAKC;IAED,yDAAyD;IACzD,+CASC;;CAOF;8BAtY6B,4BAA4B;2BAe/B,gCAAgC"}
|
package/package.json
CHANGED
|
@@ -141,11 +141,16 @@ export class Aggregate extends AggregateBase {
|
|
|
141
141
|
|
|
142
142
|
switchToFull () {
|
|
143
143
|
if (!this.entitled || this.blocked) return
|
|
144
|
+
const prevMode = this.mode
|
|
144
145
|
this.mode = MODE.FULL
|
|
146
|
+
this.#writeToStorage({ sessionReplayMode: this.mode })
|
|
147
|
+
|
|
145
148
|
// if the error was noticed AFTER the recorder was already imported....
|
|
146
149
|
if (this.recorder && this.initialized) {
|
|
150
|
+
if (prevMode === MODE.ERROR) {
|
|
151
|
+
this.agentRef.runtime.harvester.triggerHarvestFor(this)
|
|
152
|
+
}
|
|
147
153
|
if (!this.agentRef.runtime.isRecording) this.recorder.startRecording(TRIGGERS.SWITCH_TO_FULL, this.mode) // off --> full
|
|
148
|
-
this.#writeToStorage({ sessionReplayMode: this.mode })
|
|
149
154
|
} else {
|
|
150
155
|
this.initializeRecording(MODE.FULL, true, TRIGGERS.SWITCH_TO_FULL)
|
|
151
156
|
}
|
|
@@ -90,13 +90,13 @@ export class Aggregate extends AggregateBase {
|
|
|
90
90
|
registerHandler('bstApi', (...args) => this.traceStorage.storeNode(...args), this.featureName, this.ee)
|
|
91
91
|
registerHandler('trace-jserror', (...args) => this.traceStorage.storeErrorAgg(...args), this.featureName, this.ee)
|
|
92
92
|
registerHandler('pvtAdded', (...args) => this.traceStorage.processPVT(...args), this.featureName, this.ee)
|
|
93
|
+
}
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
95
|
+
if (this.mode === MODE.ERROR) {
|
|
96
|
+
/** A separate handler for noticing errors, and switching to "full" mode if running in "error" mode */
|
|
97
|
+
registerHandler('trace-jserror', () => {
|
|
98
|
+
if (this.mode === MODE.ERROR) this.switchToFull()
|
|
99
|
+
}, this.featureName, this.ee)
|
|
100
100
|
}
|
|
101
101
|
this.agentRef.runtime.session.write({ sessionTraceMode: this.mode })
|
|
102
102
|
|