Class: Gitlab::Cluster::RackTimeoutObserver

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/cluster/rack_timeout_observer.rb

Constant Summary collapse

TRANSITION_STATES =
%i(ready active).freeze

Instance Method Summary collapse

Constructor Details

#initializeRackTimeoutObserver

Returns a new instance of RackTimeoutObserver.


8
9
10
# File 'lib/gitlab/cluster/rack_timeout_observer.rb', line 8

def initialize
  @counter = Gitlab::Metrics.counter(:rack_requests_total, 'Number of requests in a given rack state')
end

Instance Method Details

#callbackObject

returns the Proc to be used as the observer callback block


13
14
15
# File 'lib/gitlab/cluster/rack_timeout_observer.rb', line 13

def callback
  method(:log_timeout_exception)
end