Skip to content

Commit

Permalink
Merge pull request kubernetes#119110 from andrewsykim/apf-metrics-beta
Browse files Browse the repository at this point in the history
Promote kube-apiserver flowcontrol metrics to Beta
  • Loading branch information
k8s-ci-robot authored Jul 17, 2023
2 parents 847f175 + d25075f commit 4f60a8d
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func (uss *uniformScenarioState) finalReview() {
}
if uss.evalInqueueMetrics {
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
` + uss.expectedInqueue
err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_current_inqueue_requests")
Expand All @@ -402,7 +402,7 @@ func (uss *uniformScenarioState) finalReview() {
}
if uss.evalExecutingMetrics && len(uss.expectedExecuting) > 0 {
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
` + uss.expectedExecuting
err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_current_executing_requests")
Expand All @@ -426,7 +426,7 @@ func (uss *uniformScenarioState) finalReview() {
}
if uss.evalExecutingMetrics && len(expectedRejects) > 0 {
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
` + expectedRejects
err := metrics.GatherAndCompare(e, "apiserver_flowcontrol_rejected_requests_total")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var (
Subsystem: subsystem,
Name: "rejected_requests_total",
Help: "Number of requests rejected by API Priority and Fairness subsystem",
StabilityLevel: compbasemetrics.ALPHA,
StabilityLevel: compbasemetrics.BETA,
},
[]string{priorityLevel, flowSchema, "reason"},
)
Expand All @@ -104,7 +104,7 @@ var (
Subsystem: subsystem,
Name: "dispatched_requests_total",
Help: "Number of requests executed by API Priority and Fairness subsystem",
StabilityLevel: compbasemetrics.ALPHA,
StabilityLevel: compbasemetrics.BETA,
},
[]string{priorityLevel, flowSchema},
)
Expand Down Expand Up @@ -206,7 +206,7 @@ var (
Subsystem: subsystem,
Name: "current_inqueue_requests",
Help: "Number of requests currently pending in queues of the API Priority and Fairness subsystem",
StabilityLevel: compbasemetrics.ALPHA,
StabilityLevel: compbasemetrics.BETA,
},
[]string{priorityLevel, flowSchema},
)
Expand Down Expand Up @@ -237,7 +237,7 @@ var (
Subsystem: subsystem,
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",
StabilityLevel: compbasemetrics.ALPHA,
StabilityLevel: compbasemetrics.BETA,
},
[]string{priorityLevel, flowSchema},
)
Expand All @@ -247,7 +247,7 @@ var (
Subsystem: subsystem,
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",
StabilityLevel: compbasemetrics.ALPHA,
StabilityLevel: compbasemetrics.BETA,
},
[]string{priorityLevel, flowSchema},
)
Expand All @@ -269,7 +269,7 @@ var (
Name: "request_wait_duration_seconds",
Help: "Length of time a request spent waiting in its queue",
Buckets: requestDurationSecondsBuckets,
StabilityLevel: compbasemetrics.ALPHA,
StabilityLevel: compbasemetrics.BETA,
},
[]string{priorityLevel, flowSchema, "execute"},
)
Expand Down Expand Up @@ -334,7 +334,7 @@ var (
Subsystem: subsystem,
Name: "nominal_limit_seats",
Help: "Nominal number of execution seats configured for each priority level",
StabilityLevel: compbasemetrics.ALPHA,
StabilityLevel: compbasemetrics.BETA,
},
[]string{priorityLevel},
)
Expand Down
82 changes: 82 additions & 0 deletions test/instrumentation/testdata/stable-metrics-list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,88 @@
stabilityLevel: STABLE
labels:
- 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
namespace: kubernetes
help: This metric records the result of a single healthcheck.
Expand Down

0 comments on commit 4f60a8d

Please sign in to comment.