Module: Strumbar::Instrumentation::ActiveRecord

Defined in:
lib/strumbar/instrumentation/active_record.rb

Class Method Summary collapse

Class Method Details

.load(options = {}) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/strumbar/instrumentation/active_record.rb', line 4

def self.load(options={})
  options[:rate] ||= Strumbar.default_rate

  Strumbar.subscribe /sql.active_record/ do |client, event|
    client.timing 'query_log', event.duration, options[:rate]
  end
end