Class: Instana::Activators::Excon
Instance Method Summary
collapse
#call, call, inherited, start
Instance Method Details
#can_instrument? ⇒ Boolean
7
8
9
|
# File 'lib/instana/activators/excon.rb', line 7
def can_instrument?
defined?(::Excon) && defined?(::Excon::Middleware::Base) && ::Excon.respond_to?(:defaults) && Instana.config[:excon][:enabled]
end
|
#instrument ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/instana/activators/excon.rb', line 11
def instrument
require 'instana/instrumentation/excon'
::Excon.defaults[:middlewares].unshift(::Instana::Instrumentation::Excon)
true
end
|