Reformat metric labels to consistently use snake case#4893
Reformat metric labels to consistently use snake case#4893JamesMurkin wants to merge 1 commit intomasterfrom
Conversation
Greptile SummaryThis PR adds snake_case aliases alongside every existing camelCase Prometheus metric label (e.g. The mechanical changes are consistent throughout: label counts in descriptors match value counts in every Confidence Score: 4/5Safe to merge — all label/value cardinalities are consistent and tests pass the updated counts. No bugs found. Label counts in every descriptor match the value positions in every recording call. The test changes are correct and include a pre-existing semantic fix. Score is 4 rather than 5 purely because of the breadth of mechanical changes across many metrics — a subtle off-by-one in any single call site would cause a runtime panic. internal/common/metrics/scheduler_metrics.go and internal/scheduler/metrics/cycle_metrics.go have the most label changes and are worth a final spot-check. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Metric recorded in code] --> B{Label type}
B -->|camelCase legacy label| C["e.g. priorityClass=X\nnodeType=Y\noverAllocated=Z"]
B -->|snake_case new label| D["e.g. priority_class=X\nnode_type=Y\nover_allocated=Z"]
C --> E[Single Prometheus time series\ncarries both label sets]
D --> E
E --> F[Phase 2: Remove camelCase labels\nfuture PR]
E --> G[Dashboards/alerts migrate\nto snake_case]
Reviews (1): Last reviewed commit: "Reformat metric labels to consistently u..." | Re-trigger Greptile |
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: