Module: HTTPInstrumentation::Instrumentation::TyphoeusHook::Multi

Defined in:
lib/http_instrumentation/instrumentation/typhoeus_hook.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.aliasedObject

Returns the value of attribute aliased.



28
29
30
# File 'lib/http_instrumentation/instrumentation/typhoeus_hook.rb', line 28

def aliased
  @aliased
end

Instance Method Details

#run(*args) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/http_instrumentation/instrumentation/typhoeus_hook.rb', line 31

def run(*args)
  HTTPInstrumentation.instrument("typhoeus") do |payload|
    begin
      payload[:count] = queued_requests.size
    rescue
    end

    if HTTPInstrumentation::Instrumentation::TyphoeusHook::Multi.aliased
      run_without_http_instrumentation(*args)
    else
      super
    end
  end
end