@newrelic/browser-agent 1.298.0-rc.6 → 1.298.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 +1 -1
- package/dist/cjs/features/session_replay/shared/recorder.js +6 -2
- 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 +1 -1
- package/dist/esm/features/session_replay/shared/recorder.js +6 -2
- package/dist/types/features/session_replay/shared/recorder.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/session_replay/aggregate/index.js +1 -1
- package/src/features/session_replay/shared/recorder.js +5 -1
|
@@ -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.298.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.298.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.DIST_METHOD = exports.BUILD_EN
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.298.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.298.0-rc.8";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -142,7 +142,7 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
142
142
|
sessionReplayMode: this.mode
|
|
143
143
|
});
|
|
144
144
|
} else {
|
|
145
|
-
this.initializeRecording(_constants2.MODE.FULL, true);
|
|
145
|
+
this.initializeRecording(_constants2.MODE.FULL, true, _constants.TRIGGERS.SWITCH_TO_FULL);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -59,9 +59,13 @@ class Recorder {
|
|
|
59
59
|
this.#canRecord = false;
|
|
60
60
|
this.stopRecording();
|
|
61
61
|
}, this.srFeatureName, this.ee);
|
|
62
|
-
|
|
62
|
+
|
|
63
|
+
/** If Agg is already drained before importing the recorder (likely deferred API call pattern),
|
|
64
|
+
* registerHandler wont do anything. Just set up the on listener directly */
|
|
65
|
+
const processReplayNode = (event, isCheckout) => {
|
|
63
66
|
this.audit(event, isCheckout);
|
|
64
|
-
}
|
|
67
|
+
};
|
|
68
|
+
if (this.srInstrument.featAggregate?.drained) this.ee.on(RRWEB_DATA_CHANNEL, processReplayNode);else (0, _registerHandler.registerHandler)(RRWEB_DATA_CHANNEL, processReplayNode, this.srFeatureName, this.ee);
|
|
65
69
|
}
|
|
66
70
|
get trigger() {
|
|
67
71
|
return this.triggerHistory[this.triggerHistory.length - 1];
|
|
@@ -52,9 +52,13 @@ export class Recorder {
|
|
|
52
52
|
this.#canRecord = false;
|
|
53
53
|
this.stopRecording();
|
|
54
54
|
}, this.srFeatureName, this.ee);
|
|
55
|
-
|
|
55
|
+
|
|
56
|
+
/** If Agg is already drained before importing the recorder (likely deferred API call pattern),
|
|
57
|
+
* registerHandler wont do anything. Just set up the on listener directly */
|
|
58
|
+
const processReplayNode = (event, isCheckout) => {
|
|
56
59
|
this.audit(event, isCheckout);
|
|
57
|
-
}
|
|
60
|
+
};
|
|
61
|
+
if (this.srInstrument.featAggregate?.drained) this.ee.on(RRWEB_DATA_CHANNEL, processReplayNode);else registerHandler(RRWEB_DATA_CHANNEL, processReplayNode, this.srFeatureName, this.ee);
|
|
58
62
|
}
|
|
59
63
|
get trigger() {
|
|
60
64
|
return this.triggerHistory[this.triggerHistory.length - 1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAqBA;IAUE,+
|
|
1
|
+
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAqBA;IAUE,+BAiCC;IAnCD,sBAAmB;IAGjB,iDAAiD;IACjD,kBAAgC;IAEhC,QAAyB;IACzB,mBAA6C;IAC7C,cAAqC;IAErC,qBAAwB;IACxB,0FAA0F;IAC1F,eAAkE;IAElE,iHAAiH;IACjH,uBAAgD;IAChD,mFAAmF;IACnF,iCAA0D;IAC1D,uIAAuI;IACvI,yBAA4B;IAC5B,kIAAkI;IAClI,kBAAqB;IACrB,uIAAuI;IACvI,0BAAwE;IAc1E,mBAEC;IAED;;;;;;;;;MAWC;IAED,kFAAkF;IAClF,oBAGC;IAED,qDAAqD;IACrD,8CAyCC;IAED;;;;;OAKG;IACH,aAHW,GAAC,cACD,GAAC,QAiCX;IAED,yHAAyH;IACzH,yCAgCC;IAED,0HAA0H;IAC1H,yBAOC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED;;;SAGK;IACL,oCAGC;;CACF;+BApO8B,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -136,7 +136,7 @@ export class Aggregate extends AggregateBase {
|
|
|
136
136
|
if (!this.agentRef.runtime.isRecording) this.recorder.startRecording(TRIGGERS.SWITCH_TO_FULL, this.mode) // off --> full
|
|
137
137
|
this.syncWithSessionManager({ sessionReplayMode: this.mode })
|
|
138
138
|
} else {
|
|
139
|
-
this.initializeRecording(MODE.FULL, true)
|
|
139
|
+
this.initializeRecording(MODE.FULL, true, TRIGGERS.SWITCH_TO_FULL)
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -57,7 +57,11 @@ export class Recorder {
|
|
|
57
57
|
this.stopRecording()
|
|
58
58
|
}, this.srFeatureName, this.ee)
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
/** If Agg is already drained before importing the recorder (likely deferred API call pattern),
|
|
61
|
+
* registerHandler wont do anything. Just set up the on listener directly */
|
|
62
|
+
const processReplayNode = (event, isCheckout) => { this.audit(event, isCheckout) }
|
|
63
|
+
if (this.srInstrument.featAggregate?.drained) this.ee.on(RRWEB_DATA_CHANNEL, processReplayNode)
|
|
64
|
+
else registerHandler(RRWEB_DATA_CHANNEL, processReplayNode, this.srFeatureName, this.ee)
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
get trigger () {
|