dongjoon-hyun opened a new pull request, #917:
URL: https://github.com/apache/spark-kubernetes-operator/pull/917
### What changes were proposed in this pull request?
This PR fixes the "Kubernetes Client Metrics" table in
`docs/configuration.md` so that the metric names and descriptions match what
`KubernetesMetricsInterceptor` actually registers (source name
`kubernetes.client` + the registry-local name).
- `kubernetes.client.http.response.failed` -> `kubernetes.client.failed`.
The description is also corrected: the meter is marked on both a connection
failure (no response) and a non-successful response (e.g. `404`).
- `kubernetes.client.http.response.{1,2,3,4,5}xx` ->
`kubernetes.client.{1,2,3,4,5}xx`. The misleading "per response code" wording
is removed, and the table now notes that these meters exist only when
`spark.kubernetes.operator.metrics.clientMetricsGroupByResponseCodeEnabled` is
`true` (default).
- The request method, resource name, and namespace name segments are always
lower-cased in the registry, so the placeholders are now written in lower case
with examples (`get`, `configmaps.get`, `spark-test.sparkapplications.post`).
- The paragraph below the table now also says that a request which gets an
error response is counted in `kubernetes.client.failed` and
`kubernetes.client.http.response`, so that it is consistent with the table.
### Why are the changes needed?
The documented names do not exist at runtime, so a dashboard or an alert
built from the documentation would never match. Also, the paragraph below the
table already referred to `kubernetes.client.failed`, which contradicted the
table row `kubernetes.client.http.response.failed`.
I verified the actual names by running the existing
`KubernetesMetricsInterceptorTest` scenario (create a `SparkApplication`, get a
`ConfigMap` that returns `404`) with a temporary probe that printed the
registry:
```
http.request = 2
http.response = 2
http.response.201 = 1
http.response.404 = 1
http.request.get = 1
http.request.post = 1
failed = 1 <- from the 404 response
1xx = 0, 2xx = 1, 3xx = 0, 4xx = 1, 5xx = 0
configmaps.get = 1
sparkapplications.post = 1
spark-test.sparkapplications.post = 1
spark-system.configmaps.get = 1
http.response.latency.nanos = Histogram
```
### Does this PR introduce _any_ user-facing change?
Yes, the documentation is fixed. There is no behavior change, and the
operator code is untouched.
### How was this patch tested?
Manually. I compared the table against `KubernetesMetricsInterceptor` and
the registry output shown above. The temporary probe test was removed
afterwards.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Sonnet 5.5
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]