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
window.NREUM.init.proxy={}// Proxy won't work for experiments
7
7
window.NREUM.init.session_replay.enabled=true// feature is enabled, but the app settings will have sampling at 0. We can proactively enable SR for certain test cases through app settings
8
8
window.NREUM.init.session_trace.enabled=true// feature is enabled, but the app settings will have sampling at 0. We can proactively enable SR for certain test cases through app settings
window.NREUM.init.session_replay.enabled=true// feature is enabled, but the app settings will have sampling at 0. We can proactively enable SR for certain test cases through app settings
9
9
window.NREUM.init.session_trace.enabled=true// feature is enabled, but the app settings will have sampling at 0. We can proactively enable SR for certain test cases through app settings
if(!wasSaved){// if the ixn was saved, then its ajax reqs are part of the payload whereas if it was discarded, it should still be harvested in the ajax feature itself
registerHandler('xhr',function(){// the EE-drain system not only switches "this" but also passes a new EventContext with info. Should consider platform refactor to another system which passes a mutable context around separately and predictably to avoid problems like this.
46
34
classThis.storeXhr(...arguments,this)// this switches the context back to the class instance while passing the NR context as an argument -- see "ctx" in storeXhr
47
35
},this.featureName,this.ee)
@@ -121,12 +109,8 @@ export class Aggregate extends AggregateBase {
// Note: the following are subject to potential race cond wherein if the other feature aren't fully initialized, it'll be treated as there being no associated interaction.
206
-
// They each will also tack on their respective properties to the params object as part of the decision flow.
if(params.browserInteractionId&&!params._softNavFinished){// hold onto the error until the in-progress interaction is done, eithered saved or discarded
/** MFE specific attributes if in "multiple" mode (ie consumer version 2) */
231
215
...getVersion2Attributes(target,this)
232
216
}
233
217
234
-
if(softNavOccurredFinished){
235
-
Object.entries(softNavCustomAttrs).forEach(([k,v])=>setCustom(k,v))// when an ixn finishes, it'll include stuff in jsAttributes + attrs specific to the ixn
236
-
bucketHash+=params.browserInteractionId
237
-
238
-
deleteparams._softNavAttributes// cleanup temp properties from synchronous evaluation; this is harmless when async from soft nav (properties DNE)
239
-
deleteparams._softNavFinished
240
-
}else{// interaction was cancelled -> error should not be associated OR there was no interaction
Object.entries(softNavCustomAttrs).forEach(([k,v])=>setCustom(k,v))// when an ixn finishes, it'll pass attrs specific to the ixn; if no associated ixn, this defaults to empty
conststartTime=jsErrorEvent[3].time// in storeError fn, the newMetrics obj contains the time passed to & used by SN to seek the ixn
305
-
if(startTime>interactionEndTime)returnthis.#storeJserrorForHarvest(jsErrorEvent,false,softNavAttrs)// disassociate any error that ultimately falls outside the final ixn span
// Whether the interaction is in-progress or already finished, the id will let jserror buffer it under its index, until it gets the next step instruction.
// This information cannot be relayed back via handle() that flushes buffered errs because this is being called by a jserror's handle() per se and before the err is buffered.
207
-
params._softNavFinished=true// instead, signal that this err can be processed right away without needing to be buffered aka wait for an in-progress ixn
handle('softNavFlush',[associatedInteraction.id,false,undefined],undefined,FEATURE_NAMES.jserrors,this.ee)))// don't take custom attrs from cancelled ixns
210
+
// Interaction still in progress, wait for it to finish or be cancelled
@@ -227,7 +235,7 @@ export class Aggregate extends AggregateBase {
227
235
if(this.associatedInteraction?.trigger===IPL_TRIGGER_NAME)this.associatedInteraction=null// the api get-interaction method cannot target IPL
228
236
if(!this.associatedInteraction){
229
237
// This new api-driven interaction will be the target of any subsequent .interaction() call, until it is closed by EITHER .end() OR the regular url>dom change process.
thisClass.domObserver.observe(document.body,{attributes: true,childList: true,subtree: true,characterData: true})// start observing for DOM changes like a regular UI-driven interaction
0 commit comments