Skip to content

CircuitBreaker: record an outcome without guarding the call #10110

Closed

Description

@Tarekkharsa

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

  1. self-assigned this
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions