Module: NewRelic::Security::Instrumentation::Curl::Multi::Chain

Defined in:
lib/newrelic_security/instrumentation-security/curb/chain.rb

Class Method Summary collapse

Class Method Details

.instrument!Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/newrelic_security/instrumentation-security/curb/chain.rb', line 7

def self.instrument!
  ::Curl::Multi.class_eval do
    include NewRelic::Security::Instrumentation::Curl::Multi

    alias_method :perform_without_security, :perform
    
    def perform(*args, &block)
      retval = nil
      event = perform_on_enter(*args) { retval = perform_without_security(*args, &block) }
      perform_on_exit(event) { return retval }
    end
    
  end
end