Module: HTTPInstrumentation::Instrumentation::HTTPXHook

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

Overview

This module is responsible for instrumenting the httpx gem.

Class Method Summary collapse

Class Method Details

.installed?Boolean

Returns:

  • (Boolean)


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

def installed?
  !!(defined?(::HTTPX::Session) && ::HTTPX::Session.include?(self))
end

.instrument!Object



13
14
15
# File 'lib/http_instrumentation/instrumentation/httpx_hook.rb', line 13

def instrument!
  Instrumentation.instrument!(::HTTPX::Session, self) if defined?(::HTTPX::Session)
end