Module: HTTPInstrumentation::Instrumentation

Defined in:
lib/http_instrumentation/instrumentation.rb,
lib/http_instrumentation/instrumentation/curb_hook.rb,
lib/http_instrumentation/instrumentation/http_hook.rb,
lib/http_instrumentation/instrumentation/ethon_hook.rb,
lib/http_instrumentation/instrumentation/excon_hook.rb,
lib/http_instrumentation/instrumentation/httpx_hook.rb,
lib/http_instrumentation/instrumentation/patron_hook.rb,
lib/http_instrumentation/instrumentation/net_http_hook.rb,
lib/http_instrumentation/instrumentation/typhoeus_hook.rb,
lib/http_instrumentation/instrumentation/httpclient_hook.rb

Defined Under Namespace

Modules: CurbHook, EthonHook, ExconHook, HTTPClientHook, HTTPHook, HTTPXHook, NetHTTPHook, PatronHook, TyphoeusHook

Class Method Summary collapse

Class Method Details

.instrument!(klass, instrumentation_module) ⇒ Object

Helper method to prepend an instrumentation module to a class.



17
18
19
# File 'lib/http_instrumentation/instrumentation.rb', line 17

def instrument!(klass, instrumentation_module)
  klass.prepend(instrumentation_module) unless klass.include?(instrumentation_module)
end