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

Inherits:
Excon::Middleware::Base
  • Object
show all
Defined in:
lib/skylight/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

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.



8
9
10
11
# File 'lib/skylight/probes/excon/middleware.rb', line 8

def initialize(*)
  @requests = {}.compare_by_identity
  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.



28
29
30
31
32
# File 'lib/skylight/probes/excon/middleware.rb', line 28

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



17
18
19
20
# File 'lib/skylight/probes/excon/middleware.rb', line 17

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.



22
23
24
25
26
# File 'lib/skylight/probes/excon/middleware.rb', line 22

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