mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Log latency error if the difference is >= 2ms
The lb_agent logs an error if the difference between exec and call latency is >=0, this change increase the value to reduce some potential false positive. resolve 1371
This commit is contained in:
@@ -364,7 +364,7 @@ func recordCallLatency(ctx context.Context, call *call, status string) {
|
||||
// some sanity check before. If sanity checks flags something, then
|
||||
// this is likely that runners are sending malicious/suspicious data.
|
||||
if execLatency != nil {
|
||||
if *execLatency >= callLatency {
|
||||
if *execLatency-callLatency >= 2*time.Millisecond {
|
||||
common.Logger(ctx).Errorf("invalid latency callLatency=%v execLatency=%v", callLatency, execLatency)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user