new CBStats(options)
Circuit breaker statistics
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
Methods
-
add(intervals)
-
Add intervals emitted by the
CircuitBreaker#event:interval
event.Parameters:
Name Type Description intervals
Array.<object> Array of
CircuitBreaker#event:interval
instances -
getSummary() → {CBStats~Summary}
-
Get statistics summary
Returns:
stats
- Type
- CBStats~Summary
Type Definitions
-
CountsSummary
-
Type:
- object
-
HealthSummary
-
- Source:
Properties:
Name Type Description total
integer Total amount of calls
success
integer Total amount of successful calls
totalErrors
integer Total errors
timeouts
integer Total amount of TimeoutError errors
rejected
integer Total amount of OpenCircuitError errors
otherErrors
integer Total amount of errors which are neither timeouts nor rejections
errors
object Total error counts by name
callRate
float Calls per second
active
integer Current active calls
queued
integer Current queued calls
-
Summary
-
Type:
- object
- Source:
Properties:
Name Type Description times
CBStats~TimesSummary Times summary
counts
CBStats~CountsSummary Cummulative counts summary
health
CBStats~HealthSummary Health summary
-
TimesSummary
-
Type:
- object