-
Story
-
Resolution: Done
-
Major
-
None
Create metric name linter, that will check if the metric name meets the best practices requirements, based on the following parameters:
1. Prefix. Example: "kubevirt"
2. Sub operator name. Example: ssp / hco / cdi / etc.
*Note: we made an exception for kubevirt operator that don't require this.
3. What is being measured (can be more than 1 word) : vmi_disk / vmi_cpu / vmi_memory / vmi_filesystem / common template / cr / etc.
4. What state is being measured. Example: used / available / reconciled / up / down / ready / deployed / capacity / etc.
5. units. based on Prometheus recommended units or "count" when there is no unit.
6. total. if applicable. "total" should only be used at the end of a metric name.
Note: We usually add "total" suffix only when there is no room for additional aggregation on the metric based on the labels. So if the metric or recording rule includes labels like "namespace", "vm_name", "pod", etc. it should not include a total suffix.
Git Pull Request: https://github.com/kubevirt/ssp-operator/pull/621
- split from
-
CNV-29827 [SSP] Create a metric name linter
-
- Closed
-