Skip to content

feat: add Grafana panels for lease and Redis health - #64

Merged
yashdotdev13 merged 1 commit into
yashdotdev13:mainfrom
ilker-ekin:feat/40-grafana-redis-lease-panels
Oct 23, 2026
Merged

yashdotdev13 merged 1 commit into
yashdotdev13:mainfrom
ilker-ekin:feat/40-grafana-redis-lease-panels

Conversation

@ilker-ekin

@ilker-ekin ilker-ekin commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Expand the Grafana dashboard with panels for distributed lease health, decision latency percentiles and per-instance health, using only the metrics the gateways already export.

Related issue

Closes #40

Type of change

  • Bug fix
  • New feature
  • Refactoring
  • Performance improvement
  • Documentation
  • Test improvement
  • Security improvement

What changed?

The five existing panels are unchanged. Three rows are added below them in monitoring/grafana/dashboards/traffic-control.json:

Row Panel Query
Leases Lease Allocation Success Rate success / attempt per instance
Leases Lease Allocation Failures failure rate per inst
Leases Quota Exhaustion (fleet, last 5m) sum(increase(traffic_control_quota_exhausted_total[5m]))
Decision latency Decision Latency p50 / p95 / p99 tration_seconds{quantile=...} per instance
Decision latency Decision Latency Max traffic_control_decision_duration_seconds_max per instance
Instance & Redis health Gateway Up `up{job="traffic-co per instance)
Instance & Redis health Lease Allocation Failure Ratio failure / attempt per instance

Design decisions:

  • Decision latency quantiles are client-side Micrometer quantiles, so they are shown per instance and never averaged or summed across instances.
  • Every query groups only by instance, quantile or `resuare added.
  • No Redis health metric is exported today. result="failure" means Redis answered but reported insufficient global capacity, while Redis
    connection errors are not counted as failures. The failure-rscribed as capacity exhaustion, not as a Redis health signal. A real Redis signal (Redis exporter or Lettuce client metrics) would be a follow-up.

Validation

  • .\mvnw.cmd -B verify passes locally (not applicable: dashboard JSON only)
  • Relevant integration tests were added/updated (not app
  • Docker/Redis behavior was tested where applicable
  • Documentation was updated where applicable (not neededhboard panels)
  • CI is expected to remain green

Additionally:

  • python3 -m json.tool passes on the dashboard JSON
  • Static checks: existing panels unchanged, unique new p, only existing metric names, grouping only by instance /quantile / result
  • Dashboard loaded in Grafana against the Docker Composel three gateway instances visible

Distributed-systems impact

None. Dashboard JSON only: no change to Redis coordination, , concurrency, expiration/reclamation, consistency or failure handling. No application code, metrics, labels or Prometheus configuration changed.

Breaking changes

  • None
  • Yes — described below

Checklist

  • The PR is focused on one logical change
  • No secrets or credentials were committed
  • No unrelated files were modified
  • Tests cover changed behavior (not applicable: dashboard only)
  • Metrics remain low-cardinality

Question for the maintainer

The existing "Decision Latency p95" panel uses histogram_qurol_decision_duration_seconds_bucket, but the decision timer is built with publishPercentiles(0.50, 0.95, 0.99) and no percentile histogram, so it should export summary quantiles rather than _bucket
series. Does that panel currently show data for you? If not,uantile series (as the new p50/p95/p99 panel does), or should the timer enable publishPercentileHistogram()? I left it unchanged to keep this PR to the scope of the issue.

🤖 Generated with Claude Code

Add three dashboard rows below the existing panels, using only the
metrics the gateways already export:

- Leases: allocation success rate, allocation failures per second and
  fleet-wide quota exhaustion over the last 5 minutes.
- Decision latency: p50/p95/p99 and max per instance. The quantiles are
  client-side Micrometer quantiles, so they are shown per instance and
  never aggregated across instances.
- Instance & Redis health: gateway up/down from Prometheus' up series,
  and the lease allocation failure ratio. The latter reflects global
  capacity exhaustion; no Redis health metric is exported yet, which
  the panel description states.

The existing panels are unchanged. No metrics, labels or other files
are added or changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@yashdotdev13
yashdotdev13 merged commit e7d7a1b into yashdotdev13:main Oct 23, 2026
2 checks passed
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.

Add Grafana panels for Redis and lease health

2 participants