You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a specific problem? Or an existing feature?
I'm trying to add metrics and logs when the circuit breaker opens and would love to be able to log the circuit breaker failure rate.
We've set this up so it's configurable during runtime and currently, we're only logging when the failure ratio changes. However, it'll be nice to log this when the circuit is opened to validate the failure ratio is correct.
Describe the solution you'd like
Perhaps OnCircuitOpenedArguments can accept one more argument failureRatio and _behavior.FailureRate can be passed in.
I think if we wanted to go down the route of emitting more fine-grained metrics of this nature, we'd have the health metrics code itself emit metrics, rather than try and try and expose the "live" numbers to you directly at the point the circuit's state changes.
Then you could just continuously monitor the failure ratio and could correlate events like open and close with that metric.
Otherwise I think things would start to get quite complicated trying to shuffle the metrics around as there's different circuit breaking implementations abstracted from the main strategy, which just deals with "someone said I should open/close", rather than why that decision was made.
Is your feature request related to a specific problem? Or an existing feature?
I'm trying to add metrics and logs when the circuit breaker opens and would love to be able to log the circuit breaker failure rate.
We've set this up so it's configurable during runtime and currently, we're only logging when the failure ratio changes. However, it'll be nice to log this when the circuit is opened to validate the failure ratio is correct.
Describe the solution you'd like
Perhaps OnCircuitOpenedArguments can accept one more argument
failureRatio
and_behavior.FailureRate
can be passed in.Polly/src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
Line 343 in 3fb0897
Additional context
No response
The text was updated successfully, but these errors were encountered: