Sha256: cf72e6db4056b7a790916051d0d6d2c65f94d78de030538ca28f7c3bd9d88873
Contents?: true
Size: 545 Bytes
Versions: 3
Compression:
Stored size: 545 Bytes
Contents
module ActiveRecordMetricEventsExtension # extend ActiveSupport::Concern # # # This triggers a event for the metric logger service. # # # # Example: # # # # class PagesController # # def show # # # ... # # @page.log_metric_event(:show) # # end # # end # # # def log_metric_event(type) # type = "#{type}_#{self.class.name.underscore}" # e.g. show_page # MetricLogger.log_event(self.attributes, type: type) # end # end # ActiveRecord::Base.send( :include, ActiveRecordMetricEventsExtension )
Version data entries
3 entries across 3 versions & 1 rubygems