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

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

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 Attribute Summary

Attributes inherited from UnboundedMetrics

#clock, #metrics_key, #redis, #scripting

Instance Method Summary collapse

Methods inherited from UnboundedMetrics

#clear, #metrics_snapshot, #record_failure, #record_success

Methods inherited from Metrics

#deserialize_failure, #serialize_exception

Methods included from Domain::_MetricsStore

#clear, #metrics_snapshot, #record_failure, #record_success

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