Module: NewRelic::Agent::Instrumentation::SequelInstrumentation

Defined in:
lib/newrelic_sequel/sequel.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



102
103
104
105
106
107
# File 'lib/newrelic_sequel/sequel.rb', line 102

def self.included(klass)
  klass.class_eval do
    alias_method :log_duration_without_newrelic_instrumentation, :log_duration
    alias_method :log_duration, :log_duration_with_newrelic_instrumentation
  end
end

Instance Method Details

#log_duration_with_newrelic_instrumentation(duration, sql) ⇒ Object



109
110
111
112
113
# File 'lib/newrelic_sequel/sequel.rb', line 109

def log_duration_with_newrelic_instrumentation(duration, sql)
  SequelDurationRecorder.record(duration, sql)
ensure
  log_duration_without_newrelic_instrumentation(duration, sql)
end