cmd/derper,derp: add metrics for rate limit hits (#19560)
Expvars track count of rate limiters exceeding their threshold. Covers (1) global rate limiter and (2) total of local rate limiters. Also publish optional rate-limit metrics during ExpVar() call if -rate-config is specified. Fixes current rate-limit metrics being published outside of "derp" in /debug/vars. Updates tailscale/corp#38509 Change-Id: Ic7f5a1e890d0d7d3d7b679daa4b5f8926a6a6964 Signed-off-by: Alex Valiushko <alexvaliushko@tailscale.com>
This commit is contained in:
+1
-1
@@ -353,7 +353,7 @@ func TestSendRecv(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
serverMetrics := s.ExpVar().(*metrics.Set)
|
||||
serverMetrics := s.ExpVar(false).(*metrics.Set)
|
||||
|
||||
wantActive := func(total, home int64) {
|
||||
t.Helper()
|
||||
|
||||
Reference in New Issue
Block a user