Reformat metric labels to consistently use snake case#4893
Conversation
Greptile SummaryThis PR adds snake_case label equivalents alongside existing camelCase labels across Armada's scheduler, executor, and ingest metric descriptors — the first step of a two-phase migration toward consistent snake_case Prometheus labels. No old labels are removed, so existing dashboards and alert rules are unaffected during the transition window.
Confidence Score: 5/5Safe to merge — the change is purely additive, no existing labels are removed, and label-count alignment between descriptors and call sites is consistent across all eight files. Every descriptor addition has a correctly matching call-site update, the test suite is updated (and incidentally corrected) to reflect the new label cardinality, and no old labels are dropped, preserving backward compatibility for running dashboards. No files require special attention; the mechanical repetitiveness of the change has been applied uniformly. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Metric Descriptor Definition\ne.g. prometheus.NewDesc / NewCounterVec] --> B[Label slice\ncamelCase labels kept\nsnake_case labels appended]
B --> C[Constructor / WithLabelValues call\noriginal value passed twice:\nonce for camelCase label\nonce for snake_case label]
C --> D[Prometheus time series\ncarries both label sets]
D --> E1[Existing dashboards\nread camelCase labels\nunchanged]
D --> E2[New dashboards / alerts\ncan use snake_case labels]
E1 & E2 --> F[Phase 2 - future PR\nRemove camelCase labels]
Reviews (3): Last reviewed commit: "Merge branch 'master' into reformat_metr..." | Re-trigger Greptile |
Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
Add snakecase equivalent of all labels to our metrics, with the longer term goal of moving wholesale to snake case labels
This will take 2 steps: