You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -69,7 +69,7 @@ export class Instrument extends InstrumentBase {
69
69
/**
70
70
* This func is use for early pre-load recording prior to replay feature (agg) being loaded onto the page. It should only setup once, including if already called and in-progress.
71
71
*/
72
-
async #preloadStartRecording (){
72
+
async #preloadStartRecording (trigger){
73
73
if(this.#alreadyStarted)return
74
74
this.#alreadyStarted =true
75
75
@@ -78,7 +78,7 @@ export class Instrument extends InstrumentBase {
78
78
79
79
// If startReplay() has been used by this point, we must record in full mode regardless of session preload:
80
80
// Note: recorder starts here with w/e the mode is at this time, but this may be changed later (see #apiStartOrRestartReplay else-case)
81
-
this.recorder??=newRecorder({ ...this,mode: this.#mode,agentRef: this.#agentRef,timeKeeper: this.#agentRef.runtime.timeKeeper})// if TK exists due to deferred state, pass it
81
+
this.recorder??=newRecorder({ ...this,mode: this.#mode,agentRef: this.#agentRef,trigger,timeKeeper: this.#agentRef.runtime.timeKeeper})// if TK exists due to deferred state, pass it
82
82
this.recorder.startRecording()
83
83
this.abortHandler=this.recorder.stopRecording
84
84
}catch(err){
@@ -95,7 +95,7 @@ export class Instrument extends InstrumentBase {
Copy file name to clipboardExpand all lines: src/features/utils/aggregate-base.js
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,9 @@ export class AggregateBase extends FeatureBase {
35
35
/** @type {Boolean} indicates if custom attributes are combined in each event payload for size estimation purposes. this is set to true in derived classes that need to evaluate custom attributes separately from the event payload */
36
36
this.customAttributesAreSeparate=false
37
37
/** @type {Boolean} indicates if the feature can harvest early. This is set to false in derived classes that need to block early harvests, like ajax under certain conditions */
38
-
this.canHarvestEarly=true// this is set to false in derived classes that need to block early harvests, like ajax under certain conditions
38
+
this.canHarvestEarly=true
39
+
/** @type {Boolean} indicates if the feature is actively in a retry deferral period */
40
+
this.isRetrying=false
39
41
40
42
this.harvestOpts={}// features aggregate classes can define custom opts for when their harvest is called
41
43
@@ -82,7 +84,7 @@ export class AggregateBase extends FeatureBase {
// count (c) only exists if the same label is called more than once. It should have only early harvested once (on page load), which caused it to be denied by 429 by the scheduleReply. It should NOT try to early harvest twice since it is in retry mode.
/** if we track internal and spawn early requests, we can potentially create a feedback loop that goes on forever with large ajax requests describing themselves */
40
66
it('should not harvest AJAX early when agent is tracking internal calls',async()=>{
0 commit comments