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
// is event in the valid SR buffer window? (for handling error mode cases)
35
35
// if it is, is SR recording right now? (if it isnt, we prefer to take the less risky option of assigning false negatives over false positives)
36
-
// If neither valid nor recording, this event cant reasonably be related to a valid harvest, so just delete hasReplay and harvest it now.
36
+
// If neither valid nor recording, this event cant reasonably be related to a valid harvest, so do not add hasReplay and harvest it now.
37
37
return{shouldAdd: false,shouldHold: false}
38
38
}else{
39
39
if(srIsRecordingButHasNeverHarvested){
40
40
// timestamp is in valid window and a replay is actively recording
41
41
if(harvestOpts.isFinalHarvest){
42
-
// If this is the final harvest and we still don't have a successful SR harvest, we should just delete the hasReplay flag and harvest it to
43
-
// not drop data and not assign false positives.
42
+
// If this is the final harvest and we still don't have a successful SR harvest, we should not add the hasReplay flag and harvest it now
43
+
// to not drop data and not assign false positives.
44
44
return{shouldAdd: false,shouldHold: false}
45
45
}else{
46
46
// We now suspect a replay will harvest eventually. Because the attribution seems valid, and we are waiting on a valid harvest
47
47
// we should put the event back in the aggregator for later harvesting, to be checked again at the next harvest point.
48
48
// if error mode doesnt harvest and "resets" its look-back buffer, the attribute will be dropped. If full mode doesnt harvest it will
49
-
// time-out and shut down. If either harvests successfully, we will re-evaluate the event next time, keep the hasReplay attribute and harvest.
49
+
// time-out and shut down. If either harvests successfully, when we re-evaluate the event the next cycle, it will keep the hasReplay attribute and harvest.
50
50
return{shouldAdd: false,shouldHold: true}
51
51
}
52
52
}
53
53
}
54
54
// If we reach this point, the event is in a valid window and we can assume the session replay was active,
55
-
// so it can have its hasReplay flag added and be harvested as is.
55
+
// so it can have its hasReplay flag added and be harvested.
0 commit comments