sony / gobreaker

Circuit Breaker implemented in Go
MIT License
2.93k stars 185 forks source link

[question/proposal] Monitoring #17

Closed yklyahin closed 6 years ago

yklyahin commented 6 years ago

What is the way to collect metrics for monitoring? It would be good to get more information about the statistic of circuit breaker than just status: open, half-open and closed.

Count contains enough information about CB condition.

type Counts struct {
    Requests             uint32
    TotalSuccesses       uint32
    TotalFailures        uint32
    ConsecutiveSuccesses uint32
    ConsecutiveFailures  uint32
}