class AlacrityRails::Probe::ActiveRecord
Public Class Methods
activate()
click to toggle source
# File lib/alacrity-rails/probe/active_record.rb, line 4 def self.activate ActiveSupport::Notifications.subscribe 'sql.active_record' do |name, started, finished, unique_id, data| AlacrityRails::Client.store_timeline_event( name: data[:name], event_type: 'database', engine: 'ActiveRecord', started_at: started, finished_at: finished, detail: data[:sql] ) end end