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
{{ message }}
Repository navigation
CircuitBreaker: record an outcome without guarding the call #10110
The only way to feed an outcome into a CircuitBreaker is execute, which also guards the call: it rejects it with CircuitOpen or CircuitHalfOpen.
Why it matters
Some calls must never be refused, but their failures are still evidence that a dependency is down. Writes are the usual case: dropping or deferring a write is worse than trying it, yet a run of 5xx answers to writes says the same thing about the service as a run of failed reads. Today the choice is to guard those calls too, and refuse writes while the circuit is open, or to keep them out of the breaker and lose the signal.
Proposal
A way to record without admitting. Two shapes I can think of:
breaker.record({ key, outcome }), which records against the current generation and publishes any transition.
An execute option such as admission: "bypass", which always runs the call and records its classified outcome.
If recording outside execute is out of scope on purpose (for example because of how generations are checked), a sentence about it in the module docs would help.
Activity