mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #101162 from ihcsim/fix-malformed-request-logs
Fix Client-Side Request Throttling Malformed Logs
This commit is contained in:
commit
d3fbbfab5f
@ -602,7 +602,7 @@ func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) err
|
|||||||
if latency > extraLongThrottleLatency {
|
if latency > extraLongThrottleLatency {
|
||||||
// If the rate limiter latency is very high, the log message should be printed at a higher log level,
|
// If the rate limiter latency is very high, the log message should be printed at a higher log level,
|
||||||
// but we use a throttled logger to prevent spamming.
|
// but we use a throttled logger to prevent spamming.
|
||||||
globalThrottledLogger.Infof(message)
|
globalThrottledLogger.Infof("%s", message)
|
||||||
}
|
}
|
||||||
metrics.RateLimiterLatency.Observe(ctx, r.verb, r.finalURLTemplate(), latency)
|
metrics.RateLimiterLatency.Observe(ctx, r.verb, r.finalURLTemplate(), latency)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user