Skip to content

Align Grafana dashboards with registered metric names #1343

Description

@greatest0fallt1me

Summary

docs/dashboards/soroban-billing.json and docs/grafana-dashboard-billing-deduct.json query metric names that must match registrations in src/metrics.ts and src/metrics/registry.ts, but there is no check or documentation of the mapping.

Why this matters

Dashboards that silently show 'No data' during incidents are worse than none.

Scope

Document each panel's metric in docs/dashboards/README.md and add a script or test that parses dashboard JSON expressions and asserts every metric name is registered.

Relevant code in CalloraOrg/Callora-Backend:

  • docs/dashboards/README.md
  • docs/dashboards/soroban-billing.json
  • docs/grafana-dashboard-billing-deduct.json
  • src/metrics.ts

Priority

Low

Acceptance criteria

  • Every metric referenced in dashboard JSON is registered in code
  • docs/dashboards/README.md lists panels and metrics
  • The check runs in the unit test suite
  • Renamed metrics are updated in the dashboards

Validation

Run the new check via npm test -- src/__tests__/billingDeductMetrics.test.ts or a dedicated test.

Non-goals

  • Typo-only, formatting-only, or cosmetic changes.
  • Unrelated refactors, dependency upgrades, or broad rewrites.
  • Removing safeguards or weakening validation to make tests pass.

Contributor application

Before coding, describe the affected modules, proposed state/invariant changes, test strategy, compatibility considerations, and an estimate. Wait for assignment before starting implementation.

PR requirements

Use a feature branch and include Closes #<issue-number>. Address every criterion, map criteria to code and tests, explain security and failure-mode handling, and ensure CI passes.

Quality review

A maintainer will assess correctness, completeness, test depth, compatibility, observability, and adverse-case handling. A substantive implementation is required; merge or CI status alone does not guarantee reward eligibility.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveStellar Wave Program issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions