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
15 16 17 18 19 20 21 22 23 |
# File 'lib/inst_statsd/default_tracking.rb', line 15 def 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
25 26 27 28 29 30 |
# File 'lib/inst_statsd/default_tracking.rb', line 25 def 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
8 9 10 11 12 13 |
# File 'lib/inst_statsd/default_tracking.rb', line 8 def 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 |