Class: Stoplight::Infrastructure::Redis::Storage::RecoveryMetrics

Inherits:
UnboundedMetrics show all
Defined in:
lib/stoplight/infrastructure/redis/storage/recovery_metrics.rb

Overview

When a circuit is RED (open), Stoplight periodically sends “recovery probes” to test whether the protected service has recovered. These test requests have different semantics than normal requests and their metrics are tracked separately.

Instance Method Summary collapse

Methods inherited from UnboundedMetrics

#clear, #metrics_snapshot, #record_failure, #record_success

Methods inherited from Metrics

#deserialize_failure, #serialize_exception

Constructor Details

#initialize(redis:, scripting:, key_space:, clock:) ⇒ RecoveryMetrics

Returns a new instance of RecoveryMetrics.



12
13
14
15
# File 'lib/stoplight/infrastructure/redis/storage/recovery_metrics.rb', line 12

def initialize(redis:, scripting:, key_space:, clock:)
  super
  @metrics_key = key_space.key(:recovery_metrics)
end