Skip to content

Add Prometheus metrics for cache circuit breaker state#1018

Open
hartz0 wants to merge 1 commit into
solutions-plug:mainfrom
hartz0:feature/cache-circuit-breaker-metrics
Open

Add Prometheus metrics for cache circuit breaker state#1018
hartz0 wants to merge 1 commit into
solutions-plug:mainfrom
hartz0:feature/cache-circuit-breaker-metrics

Conversation

@hartz0

@hartz0 hartz0 commented Jun 28, 2026

Copy link
Copy Markdown

Closes #963

Description

- Added cache_circuit_breaker_state gauge metric with state labels (closed/open/half_open)
- Updated CircuitBreaker to report state changes to metrics
- Added optional metrics parameter to RedisCache constructor
- Circuit breaker now logs and tracks state transitions (closed, open, half-open)
- Added alert rules for circuit breaker open (>2min) and half-open states
- Added Grafana dashboard panels:
  * Stat panel showing current circuit breaker state with color coding
  * Timeline graph showing state transitions over time
- Metrics are updated atomically on state transitions

Closes solutions-plug#963
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@hartz0 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Cache circuit breaker state not exposed as Prometheus metric

2 participants