Skip to content

Commit 690b962

Browse files
committed
Include more comments from the review
1 parent 7677b41 commit 690b962

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/design/metrics-best-practices.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ We follow [Prometheus](https://prometheus.io/docs/practices/naming/) best practi
2525
### Avoid pre-computation
2626

2727
kube-state-metrics should expose metrics on an individual object level and avoid any sort of pre-computation unless it is required due to for example high cardinality on objects.
28-
By exposing raw metrics instead of counters, kube-state-metrics allows the user to have full control on how they want to use the metrics.
28+
We prefer not to add metrics that can be derived from existing raw metrics. For example, we would not want to expose a metric called `kube_pod_total` as it can be computed with `count(kube_pod_info)`.
29+
This way kube-state-metrics allows the user to have full control on how they want to use the metrics and gives them flexibility to do specific computation.
2930

3031
### Static object properties
3132

@@ -48,7 +49,7 @@ If an object contains a substructure that links multiple properties together (e.
4849

4950
### Optional properties
5051

51-
Some Kubernetes objects have optional fields. In case there is an optional value, it is better to not expose the label at all instead of exposing a "nil" value or an empty string.
52+
Some Kubernetes objects have optional fields. In case there is an optional value, the label should still be exposed, ideally as an empty string.
5253

5354
### Timestamps
5455

0 commit comments

Comments
 (0)