From 5ab1d974b5e340c286dc37ea22936fc275df7b72 Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Thu, 5 Nov 2020 15:31:09 +0000 Subject: [PATCH] flow control metrics: switch to snake_case for labels Signed-off-by: Adhityaa Chandrasekar --- .../cluster-administration/flow-control.md | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/content/en/docs/concepts/cluster-administration/flow-control.md b/content/en/docs/concepts/cluster-administration/flow-control.md index 5b5653260a..8ec8d5f8da 100644 --- a/content/en/docs/concepts/cluster-administration/flow-control.md +++ b/content/en/docs/concepts/cluster-administration/flow-control.md @@ -331,6 +331,13 @@ PriorityLevelConfigurations. ### Metrics +{{< note >}} +In versions of Kubernetes before v1.20, the labels `flow_schema` and +`priority_level` were inconsistently named `flowSchema` and `priorityLevel`, +respectively. If you're running Kubernetes versions v1.19 and earlier, you +should refer to the documentation for your version. +{{< /note >}} + When you enable the API Priority and Fairness feature, the kube-apiserver exports additional metrics. Monitoring these can help you determine whether your configuration is inappropriately throttling important traffic, or find @@ -338,8 +345,8 @@ poorly-behaved workloads that may be harming system health. * `apiserver_flowcontrol_rejected_requests_total` is a counter vector (cumulative since server start) of requests that were rejected, - broken down by the labels `flowSchema` (indicating the one that - matched the request), `priorityLevel` (indicating the one to which + broken down by the labels `flow_schema` (indicating the one that + matched the request), `priority_level` (indicating the one to which the request was assigned), and `reason`. The `reason` label will be have one of the following values: * `queue-full`, indicating that too many requests were already @@ -352,8 +359,8 @@ poorly-behaved workloads that may be harming system health. * `apiserver_flowcontrol_dispatched_requests_total` is a counter vector (cumulative since server start) of requests that began - executing, broken down by the labels `flowSchema` (indicating the - one that matched the request) and `priorityLevel` (indicating the + executing, broken down by the labels `flow_schema` (indicating the + one that matched the request) and `priority_level` (indicating the one to which the request was assigned). * `apiserver_current_inqueue_requests` is a gauge vector of recent @@ -384,17 +391,17 @@ poorly-behaved workloads that may be harming system health. * `apiserver_flowcontrol_current_inqueue_requests` is a gauge vector holding the instantaneous number of queued (not executing) requests, - broken down by the labels `priorityLevel` and `flowSchema`. + broken down by the labels `priority_level` and `flow_schema`. * `apiserver_flowcontrol_current_executing_requests` is a gauge vector holding the instantaneous number of executing (not waiting in a - queue) requests, broken down by the labels `priorityLevel` and - `flowSchema`. + queue) requests, broken down by the labels `priority_level` and + `flow_schema`. * `apiserver_flowcontrol_priority_level_request_count_samples` is a histogram vector of observations of the then-current number of requests broken down by the labels `phase` (which takes on the - values `waiting` and `executing`) and `priorityLevel`. Each + values `waiting` and `executing`) and `priority_level`. Each histogram gets observations taken periodically, up through the last activity of the relevant sort. The observations are made at a high rate. @@ -402,7 +409,7 @@ poorly-behaved workloads that may be harming system health. * `apiserver_flowcontrol_priority_level_request_count_watermarks` is a histogram vector of high or low water marks of the number of requests broken down by the labels `phase` (which takes on the - values `waiting` and `executing`) and `priorityLevel`; the label + values `waiting` and `executing`) and `priority_level`; the label `mark` takes on values `high` and `low`. The water marks are accumulated over windows bounded by the times when an observation was added to @@ -411,7 +418,7 @@ poorly-behaved workloads that may be harming system health. * `apiserver_flowcontrol_request_queue_length_after_enqueue` is a histogram vector of queue lengths for the queues, broken down by - the labels `priorityLevel` and `flowSchema`, as sampled by the + the labels `priority_level` and `flow_schema`, as sampled by the enqueued requests. Each request that gets queued contributes one sample to its histogram, reporting the length of the queue just after the request was added. Note that this produces different @@ -428,12 +435,12 @@ poorly-behaved workloads that may be harming system health. * `apiserver_flowcontrol_request_concurrency_limit` is a gauge vector hoding the computed concurrency limit (based on the API server's total concurrency limit and PriorityLevelConfigurations' concurrency - shares), broken down by the label `priorityLevel`. + shares), broken down by the label `priority_level`. * `apiserver_flowcontrol_request_wait_duration_seconds` is a histogram vector of how long requests spent queued, broken down by the labels - `flowSchema` (indicating which one matched the request), - `priorityLevel` (indicating the one to which the request was + `flow_schema` (indicating which one matched the request), + `priority_level` (indicating the one to which the request was assigned), and `execute` (indicating whether the request started executing). {{< note >}} @@ -445,8 +452,8 @@ poorly-behaved workloads that may be harming system health. * `apiserver_flowcontrol_request_execution_seconds` is a histogram vector of how long requests took to actually execute, broken down by - the labels `flowSchema` (indicating which one matched the request) - and `priorityLevel` (indicating the one to which the request was + the labels `flow_schema` (indicating which one matched the request) + and `priority_level` (indicating the one to which the request was assigned). ### Debug endpoints