Skip to content

Commit 3b2cafe

Browse files
committed
fix comment
1 parent 04e5b5a commit 3b2cafe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/common/util/has-replay-validator.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ export function hasReplayValidator (agentRef, timestamp, harvestOpts = {}) {
3333
if (eventIsOutsideReplayWindow || srIsNotRecording) {
3434
// is event in the valid SR buffer window? (for handling error mode cases)
3535
// 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.
3737
return { shouldAdd: false, shouldHold: false }
3838
} else {
3939
if (srIsRecordingButHasNeverHarvested) {
4040
// timestamp is in valid window and a replay is actively recording
4141
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.
4444
return { shouldAdd: false, shouldHold: false }
4545
} else {
4646
// We now suspect a replay will harvest eventually. Because the attribution seems valid, and we are waiting on a valid harvest
4747
// we should put the event back in the aggregator for later harvesting, to be checked again at the next harvest point.
4848
// 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.
5050
return { shouldAdd: false, shouldHold: true }
5151
}
5252
}
5353
}
5454
// 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.
5656
return { shouldAdd: true, shouldHold: false }
5757
}

0 commit comments

Comments
 (0)