Class: Skylight::Core::Probes::Excon::Middleware Private

Inherits:
Excon::Middleware::Base
  • Object
show all
Includes:
Util::Logging
Defined in:
lib/skylight/core/probes/excon/middleware.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Middleware for Excon that instruments requests

Instance Method Summary collapse

Methods included from Util::Logging

#config_for_logging, #debug, #error, #fmt, #info, #log, #log_context, #log_env_prefix, #raise_on_error?, #t, #trace, #trace?, #warn

Constructor Details

#initializeMiddleware

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Middleware.



11
12
13
14
# File 'lib/skylight/core/probes/excon/middleware.rb', line 11

def initialize(*)
  @requests = {}
  super
end

Instance Method Details

#error_call(datum) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
34
35
# File 'lib/skylight/core/probes/excon/middleware.rb', line 31

def error_call(datum)
  super
ensure
  end_instrumentation(datum)
end

#request_call(datum) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

TODO: Review the following:

  • Consider whether a LIFO queue would be sufficient

  • Check that errors can’t be called without a request



20
21
22
23
# File 'lib/skylight/core/probes/excon/middleware.rb', line 20

def request_call(datum)
  begin_instrumentation(datum)
  super
end

#response_call(datum) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



25
26
27
28
29
# File 'lib/skylight/core/probes/excon/middleware.rb', line 25

def response_call(datum)
  super
ensure
  end_instrumentation(datum)
end