Merge pull request #119110 from andrewsykim/apf-metrics-beta

Promote kube-apiserver flowcontrol metrics to Beta
This commit is contained in:
Kubernetes Prow Robot
2023-07-17 09:05:12 -07:00
committed by GitHub
3 changed files with 92 additions and 10 deletions

View File

@@ -379,7 +379,7 @@ func (uss *uniformScenarioState) finalReview() {
} }
if uss.evalInqueueMetrics { if uss.evalInqueueMetrics {
e := ` e := `
# HELP apiserver_flowcontrol_current_inqueue_requests [ALPHA] Number of requests currently pending in queues of the API Priority and Fairness subsystem # HELP apiserver_flowcontrol_current_inqueue_requests [BETA] Number of requests currently pending in queues of the API Priority and Fairness subsystem
# TYPE apiserver_flowcontrol_current_inqueue_requests gauge # TYPE apiserver_flowcontrol_current_inqueue_requests gauge
` + uss.expectedInqueue ` + uss.expectedInqueue
err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_current_inqueue_requests") err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_current_inqueue_requests")
@@ -402,7 +402,7 @@ func (uss *uniformScenarioState) finalReview() {
} }
if uss.evalExecutingMetrics && len(uss.expectedExecuting) > 0 { if uss.evalExecutingMetrics && len(uss.expectedExecuting) > 0 {
e := ` e := `
# HELP apiserver_flowcontrol_current_executing_requests [ALPHA] Number of requests in initial (for a WATCH) or any (for a non-WATCH) execution stage in the API Priority and Fairness subsystem # HELP apiserver_flowcontrol_current_executing_requests [BETA] Number of requests in initial (for a WATCH) or any (for a non-WATCH) execution stage in the API Priority and Fairness subsystem
# TYPE apiserver_flowcontrol_current_executing_requests gauge # TYPE apiserver_flowcontrol_current_executing_requests gauge
` + uss.expectedExecuting ` + uss.expectedExecuting
err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_current_executing_requests") err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_current_executing_requests")
@@ -426,7 +426,7 @@ func (uss *uniformScenarioState) finalReview() {
} }
if uss.evalExecutingMetrics && len(expectedRejects) > 0 { if uss.evalExecutingMetrics && len(expectedRejects) > 0 {
e := ` e := `
# HELP apiserver_flowcontrol_rejected_requests_total [ALPHA] Number of requests rejected by API Priority and Fairness subsystem # HELP apiserver_flowcontrol_rejected_requests_total [BETA] Number of requests rejected by API Priority and Fairness subsystem
# TYPE apiserver_flowcontrol_rejected_requests_total counter # TYPE apiserver_flowcontrol_rejected_requests_total counter
` + expectedRejects ` + expectedRejects
err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_rejected_requests_total") err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_rejected_requests_total")

View File

@@ -94,7 +94,7 @@ var (
Subsystem: subsystem, Subsystem: subsystem,
Name: "rejected_requests_total", Name: "rejected_requests_total",
Help: "Number of requests rejected by API Priority and Fairness subsystem", Help: "Number of requests rejected by API Priority and Fairness subsystem",
StabilityLevel: compbasemetrics.ALPHA, StabilityLevel: compbasemetrics.BETA,
}, },
[]string{priorityLevel, flowSchema, "reason"}, []string{priorityLevel, flowSchema, "reason"},
) )
@@ -104,7 +104,7 @@ var (
Subsystem: subsystem, Subsystem: subsystem,
Name: "dispatched_requests_total", Name: "dispatched_requests_total",
Help: "Number of requests executed by API Priority and Fairness subsystem", Help: "Number of requests executed by API Priority and Fairness subsystem",
StabilityLevel: compbasemetrics.ALPHA, StabilityLevel: compbasemetrics.BETA,
}, },
[]string{priorityLevel, flowSchema}, []string{priorityLevel, flowSchema},
) )
@@ -206,7 +206,7 @@ var (
Subsystem: subsystem, Subsystem: subsystem,
Name: "current_inqueue_requests", Name: "current_inqueue_requests",
Help: "Number of requests currently pending in queues of the API Priority and Fairness subsystem", Help: "Number of requests currently pending in queues of the API Priority and Fairness subsystem",
StabilityLevel: compbasemetrics.ALPHA, StabilityLevel: compbasemetrics.BETA,
}, },
[]string{priorityLevel, flowSchema}, []string{priorityLevel, flowSchema},
) )
@@ -237,7 +237,7 @@ var (
Subsystem: subsystem, Subsystem: subsystem,
Name: "current_executing_requests", Name: "current_executing_requests",
Help: "Number of requests in initial (for a WATCH) or any (for a non-WATCH) execution stage in the API Priority and Fairness subsystem", Help: "Number of requests in initial (for a WATCH) or any (for a non-WATCH) execution stage in the API Priority and Fairness subsystem",
StabilityLevel: compbasemetrics.ALPHA, StabilityLevel: compbasemetrics.BETA,
}, },
[]string{priorityLevel, flowSchema}, []string{priorityLevel, flowSchema},
) )
@@ -247,7 +247,7 @@ var (
Subsystem: subsystem, Subsystem: subsystem,
Name: "current_executing_seats", Name: "current_executing_seats",
Help: "Concurrency (number of seats) occupied by the currently executing (initial stage for a WATCH, any stage otherwise) requests in the API Priority and Fairness subsystem", Help: "Concurrency (number of seats) occupied by the currently executing (initial stage for a WATCH, any stage otherwise) requests in the API Priority and Fairness subsystem",
StabilityLevel: compbasemetrics.ALPHA, StabilityLevel: compbasemetrics.BETA,
}, },
[]string{priorityLevel, flowSchema}, []string{priorityLevel, flowSchema},
) )
@@ -269,7 +269,7 @@ var (
Name: "request_wait_duration_seconds", Name: "request_wait_duration_seconds",
Help: "Length of time a request spent waiting in its queue", Help: "Length of time a request spent waiting in its queue",
Buckets: requestDurationSecondsBuckets, Buckets: requestDurationSecondsBuckets,
StabilityLevel: compbasemetrics.ALPHA, StabilityLevel: compbasemetrics.BETA,
}, },
[]string{priorityLevel, flowSchema, "execute"}, []string{priorityLevel, flowSchema, "execute"},
) )
@@ -334,7 +334,7 @@ var (
Subsystem: subsystem, Subsystem: subsystem,
Name: "nominal_limit_seats", Name: "nominal_limit_seats",
Help: "Nominal number of execution seats configured for each priority level", Help: "Nominal number of execution seats configured for each priority level",
StabilityLevel: compbasemetrics.ALPHA, StabilityLevel: compbasemetrics.BETA,
}, },
[]string{priorityLevel}, []string{priorityLevel},
) )

View File

@@ -409,6 +409,88 @@
stabilityLevel: STABLE stabilityLevel: STABLE
labels: labels:
- resource - resource
- name: current_executing_requests
subsystem: flowcontrol
namespace: apiserver
help: Number of requests in initial (for a WATCH) or any (for a non-WATCH) execution
stage in the API Priority and Fairness subsystem
type: Gauge
stabilityLevel: BETA
labels:
- flow_schema
- priority_level
- name: current_executing_seats
subsystem: flowcontrol
namespace: apiserver
help: Concurrency (number of seats) occupied by the currently executing (initial
stage for a WATCH, any stage otherwise) requests in the API Priority and Fairness
subsystem
type: Gauge
stabilityLevel: BETA
labels:
- flow_schema
- priority_level
- name: current_inqueue_requests
subsystem: flowcontrol
namespace: apiserver
help: Number of requests currently pending in queues of the API Priority and Fairness
subsystem
type: Gauge
stabilityLevel: BETA
labels:
- flow_schema
- priority_level
- name: dispatched_requests_total
subsystem: flowcontrol
namespace: apiserver
help: Number of requests executed by API Priority and Fairness subsystem
type: Counter
stabilityLevel: BETA
labels:
- flow_schema
- priority_level
- name: nominal_limit_seats
subsystem: flowcontrol
namespace: apiserver
help: Nominal number of execution seats configured for each priority level
type: Gauge
stabilityLevel: BETA
labels:
- priority_level
- name: rejected_requests_total
subsystem: flowcontrol
namespace: apiserver
help: Number of requests rejected by API Priority and Fairness subsystem
type: Counter
stabilityLevel: BETA
labels:
- flow_schema
- priority_level
- reason
- name: request_wait_duration_seconds
subsystem: flowcontrol
namespace: apiserver
help: Length of time a request spent waiting in its queue
type: Histogram
stabilityLevel: BETA
labels:
- execute
- flow_schema
- priority_level
buckets:
- 0
- 0.005
- 0.02
- 0.05
- 0.1
- 0.2
- 0.5
- 1
- 2
- 5
- 10
- 15
- 30
- name: healthcheck - name: healthcheck
namespace: kubernetes namespace: kubernetes
help: This metric records the result of a single healthcheck. help: This metric records the result of a single healthcheck.