mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +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
|
// Prints summary metrics for request types with latency above threshold
|
||||||
// and returns number of such request types.
|
// and returns number of such request types.
|
||||||
func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResources util.StringSet) (int, error) {
|
func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResources util.StringSet) (int, error) {
|
||||||
|
ignoredVerbs := util.NewStringSet("WATCHLIST", "PROXY")
|
||||||
|
|
||||||
metrics, err := ReadLatencyMetrics(c)
|
metrics, err := ReadLatencyMetrics(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
@ -1076,7 +1078,7 @@ func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResou
|
|||||||
var badMetrics []LatencyMetric
|
var badMetrics []LatencyMetric
|
||||||
for _, metric := range metrics {
|
for _, metric := range metrics {
|
||||||
if !ignoredResources.Has(metric.resource) &&
|
if !ignoredResources.Has(metric.resource) &&
|
||||||
metric.verb != "WATCHLIST" &&
|
!ignoredVerbs.Has(metric.verb) &&
|
||||||
// We are only interested in 99%tile, but for logging purposes
|
// We are only interested in 99%tile, but for logging purposes
|
||||||
// it's useful to have all the offending percentiles.
|
// it's useful to have all the offending percentiles.
|
||||||
metric.quantile <= 0.99 &&
|
metric.quantile <= 0.99 &&
|
||||||
|
Loading…
Reference in New Issue
Block a user