You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design/metrics-best-practices.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,9 @@ This way kube-state-metrics allows the user to have full control on how they wan
31
31
### Static object properties
32
32
33
33
An object usually has a stable set of properties that do not change during its lifecycle in Kubernetes.
34
-
This includes properties like name, namespace, uid etc.
34
+
This includes properties like name, namespace, uid etc. that have a 1:1 relationship with the object.
35
35
It is a good practice to group those together into an `_info` metric.
36
+
If there is a 1:n relationship (e.g. a list of ports), it should be in a separate metric to avoid generating too many metrics.
36
37
37
38
### Dynamic object properties
38
39
@@ -41,8 +42,6 @@ These change during the lifecycle of the object.
41
42
For example a pod can be in different states like "Pending", "Running" etc.
42
43
These should be part of a "State Set" that includes labels that identify the object as well as the dynamic property.
43
44
44
-
For example:
45
-
46
45
### Linked properties
47
46
48
47
If an object contains a substructure that links multiple properties together (e.g. endpoint address and port), those should be reported in the same metric.
0 commit comments