fix: align dashboard job labels and ServiceMonitor names with actual … - #29269
fix: align dashboard job labels and ServiceMonitor names with actual …#29269rseleven wants to merge 6 commits into
Conversation
…Service names The Grafana dashboard used job labels that didn't match the Service names exposed by Argo CD. When deployed using the documented ServiceMonitor examples, Prometheus sets the job label to the ServiceMonitor metadata.name, which differed from the Service names the dashboard queries expected. - change dashboard job labels to match Service names: - argocd-application-controller-metrics → argocd-metrics - argocd-applicationset-controller-metrics → argocd-applicationset-controller - argocd-repo-server-metrics → argocd-repo-server - rename ServiceMonitors in docs to match Service names so job label is set correctly: - argocd-repo-server-metrics → argocd-repo-server - argocd-applicationset-controller-metrics → argocd-applicationset-controller - argocd-notifications-controller → argocd-notifications-controller-metrics - argocd-commit-server-metrics → argocd-commit-server Signed-off-by: rseleven <73898556+rseleven@users.noreply.github.com>
✅ Preview Environment deployed on Bunnyshell
See: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
PR Summary by QodoAlign dashboard job labels with Argo CD service names
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Bundle ReportBundle size has no change ✅ |
Code Review by Qodo
1. Dashboard queries changed without tests
|
| "uid": "$datasource" | ||
| }, | ||
| "expr": "go_memstats_heap_alloc_bytes{job=\"argocd-application-controller-metrics\",namespace=~\"$namespace\"}", | ||
| "expr": "go_memstats_heap_alloc_bytes{job=\"argocd-metrics\",namespace=~\"$namespace\"}", |
There was a problem hiding this comment.
1. Dashboard queries changed without tests 📘 Rule violation ☼ Reliability
The PR changes Grafana dashboard PromQL job selectors, altering which metrics panels display, but adds or updates no unit/e2e test covering the corrected selectors. This leaves the dashboard behavior change without automated regression coverage.
Agent Prompt
## Issue description
The dashboard PromQL job label was changed without automated coverage for the new selector.
## Issue Context
The PR changes multiple dashboard queries from metric ServiceMonitor names to Service names; tests should verify that the expected job labels remain present in the dashboard definition.
## Fix Focus Areas
- examples/dashboard.json[1561-1561]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #29269 +/- ##
==========================================
+ Coverage 65.54% 65.55% +0.01%
==========================================
Files 427 427
Lines 60659 60659
==========================================
+ Hits 39757 39767 +10
+ Misses 17264 17255 -9
+ Partials 3638 3637 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
…Service names
The Grafana dashboard used job labels that didn't match the Service names exposed by Argo CD. When deployed using the documented ServiceMonitor examples, Prometheus sets the job label to the ServiceMonitor metadata.name, which differed from the Service names the dashboard queries expected.
Checklist: