Class: InstStatsd::DefaultTracking
- Inherits:
-
Object
- Object
- InstStatsd::DefaultTracking
- Defined in:
- lib/inst_statsd/default_tracking.rb
Class Method Summary collapse
Class Method Details
.track_active_record ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/inst_statsd/default_tracking.rb', line 11 def self.track_active_record return if @ar_counter require 'aroi' ::Aroi::Instrumentation.instrument_creation! @ar_counter = InstStatsd::Counter.new('active_record') ActiveSupport::Notifications.subscribe(/instance\.active_record/) {|*args| update_active_record_count(*args)} end |
.track_cache ⇒ Object
20 21 22 23 24 25 |
# File 'lib/inst_statsd/default_tracking.rb', line 20 def self.track_cache return if @cache_read_counter @cache_read_counter = InstStatsd::Counter.new('cache.read') ActiveSupport::Notifications.subscribe(/cache_read\.active_support/) {|*args| update_cache_read_count(*args)} end |
.track_sql ⇒ Object
5 6 7 8 9 |
# File 'lib/inst_statsd/default_tracking.rb', line 5 def self.track_sql return if @sql_tracker @sql_tracker = InstStatsd::SqlTracker.new(blocked_names: ['SCHEMA']) ActiveSupport::Notifications.subscribe(/sql\.active_record/) {|*args| update_sql_count(*args)} end |