Module: NewRelic::Security::Instrumentation::Ethon::Multi::Chain

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

Class Method Summary collapse

Class Method Details

.instrument!Object



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/newrelic_security/instrumentation-security/ethon/chain.rb', line 30

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

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