Class: Metrician::ActiveRecord
- Defined in:
- lib/metrician/reporters/active_record.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Reporter
Class Method Details
.enabled? ⇒ Boolean
5 6 7 8 |
# File 'lib/metrician/reporters/active_record.rb', line 5 def self.enabled? !!defined?(::ActiveRecord) && Metrician.configuration[:database][:enabled] end |
Instance Method Details
#instrument ⇒ Object
10 11 12 13 14 |
# File 'lib/metrician/reporters/active_record.rb', line 10 def instrument ::ActiveRecord::ConnectionAdapters::AbstractAdapter.module_eval do include QueryInterceptor end end |