Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observability of Circuit breakers: expose current state of circuit breakers #735

Closed
turing85 opened this issue Nov 1, 2022 · 1 comment · Fixed by #736
Closed

Observability of Circuit breakers: expose current state of circuit breakers #735

turing85 opened this issue Nov 1, 2022 · 1 comment · Fixed by #736
Assignees
Milestone

Comments

@turing85
Copy link

turing85 commented Nov 1, 2022

The current state of circuit breakers is not exposed through metrics. It would be favorable to expose the current state of circuit breakers through metrics to, for example, configure monitoring and alerting on this metric.

Imlementation ideas:

  • create one gauge value per breaker, with possible values 0, 1, 2, encoding the states closed, half-open and open
  • create one gauges per breaker and state, set the gauge representing the current state to 1, the others to 0
  • create one value per breaker with tags encoding the state, as outlined here.
@Ladicek
Copy link
Contributor

Ladicek commented Nov 1, 2022

I'll implement this using the 3rd option: 1 gauge (ft.circuitbreaker.state.current) with tags that specify 1. the method name, 2. the state name (closed, open, halfOpen). The value of the gauge will be 1 if the corresponding circuit breaker is "currently" in given state, and 0 otherwise.

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 a pull request may close this issue.

2 participants