mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Ignore /proxy from performance metrics
This commit is contained in:
parent
cf7b0bdc2a
commit
abc24fa65c
@ -1069,6 +1069,8 @@ func ReadLatencyMetrics(c *client.Client) ([]LatencyMetric, error) {
|
||||
// Prints summary metrics for request types with latency above threshold
|
||||
// and returns number of such request types.
|
||||
func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResources util.StringSet) (int, error) {
|
||||
ignoredVerbs := util.NewStringSet("WATCHLIST", "PROXY")
|
||||
|
||||
metrics, err := ReadLatencyMetrics(c)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
@ -1076,7 +1078,7 @@ func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResou
|
||||
var badMetrics []LatencyMetric
|
||||
for _, metric := range metrics {
|
||||
if !ignoredResources.Has(metric.resource) &&
|
||||
metric.verb != "WATCHLIST" &&
|
||||
!ignoredVerbs.Has(metric.verb) &&
|
||||
// We are only interested in 99%tile, but for logging purposes
|
||||
// it's useful to have all the offending percentiles.
|
||||
metric.quantile <= 0.99 &&
|
||||
|
Loading…
Reference in New Issue
Block a user