Skip to content

Conversation

@cloud-j-luna
Copy link
Member

@cloud-j-luna cloud-j-luna commented Sep 30, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Corrected dashboard queries and variables to use the proper metric label, ensuring service filters work reliably and panels (node health, request counts, RPS, status codes, node status) display accurate data across dashboards.
  • Chores

    • Aligned metric label usage across dashboards for consistency with the current Prometheus schema and improved maintainability.

@coderabbitai
Copy link

coderabbitai bot commented Sep 30, 2025

Walkthrough

Prometheus label selectors in two Grafana dashboards were updated to replace exported_service with service across panel queries and templating variable definitions/queries. No structural or control-flow changes were made; only metric label names in expressions and label_values queries were adjusted.

Changes

Cohort / File(s) Summary of Changes
Grafana node drilldown dashboard
deploy/grafana/provisioning/dashboards/node-drilldown.json
Replaced PromQL selectors and templating queries from exported_service="$service" to service="$service"; updated label_values from exported_service to service for variables (service, proxy_type, node).
Grafana overview dashboard
deploy/grafana/provisioning/dashboards/overview.json
Switched PromQL selectors and templating variable queries from exported_service to service across panels (Healthy Nodes, RPS, Request Count, Status Codes, Node Status) and related label_values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • chainzero
  • troian

Poem

I hop through dashboards, ears held high,
Swapping labels as metrics fly.
exported_service, I bid adieu—
hello, service, clean and true.
With every query, neat and terse,
A rabbit’s tweak improves the verse.
(\_/)</> 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely describes the core change—updating Grafana dashboards to reference the service label instead of exported_service—and aligns with the conventional commit prefix “fix:”, making the intent immediately understandable to reviewers.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch luna/update-dashboards

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8dfaf41 and 48a1cdb.

📒 Files selected for processing (2)
  • deploy/grafana/provisioning/dashboards/node-drilldown.json (8 hunks)
  • deploy/grafana/provisioning/dashboards/overview.json (10 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: cloud-j-luna
PR: akash-network/rpc-proxy#35
File: internal/metrics/metrics.go:40-40
Timestamp: 2025-07-29T15:36:30.776Z
Learning: Prometheus automatically adds the "exported_" prefix to labels to preserve original target labels and differentiate labels from different sources. When labels are defined in scrape configurations, they become available with the "exported_" prefix in metrics queries, which is why dashboards should use "exported_service" even when the scrape config defines "service".
Learnt from: cloud-j-luna
PR: akash-network/rpc-proxy#35
File: internal/metrics/metrics.go:40-40
Timestamp: 2025-07-29T15:36:30.776Z
Learning: Prometheus automatically prefixes labels defined in scrape configurations with "exported_" when they conflict with internal labels. For example, a "service" label in static_configs becomes "exported_service" in the actual metrics, which is why dashboards should query using "exported_service" even when the code or config uses "service".
📚 Learning: 2025-07-29T15:36:30.776Z
Learnt from: cloud-j-luna
PR: akash-network/rpc-proxy#35
File: internal/metrics/metrics.go:40-40
Timestamp: 2025-07-29T15:36:30.776Z
Learning: Prometheus automatically adds the "exported_" prefix to labels to preserve original target labels and differentiate labels from different sources. When labels are defined in scrape configurations, they become available with the "exported_" prefix in metrics queries, which is why dashboards should use "exported_service" even when the scrape config defines "service".

Applied to files:

  • deploy/grafana/provisioning/dashboards/overview.json
  • deploy/grafana/provisioning/dashboards/node-drilldown.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloud-j-luna cloud-j-luna self-assigned this Sep 30, 2025
@cloud-j-luna cloud-j-luna merged commit 486052c into main Sep 30, 2025
5 checks passed
@cloud-j-luna cloud-j-luna deleted the luna/update-dashboards branch September 30, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants