Module: RailsMetrics::ORM::ActiveRecord
- Extended by:
- ActiveSupport::Concern
- Includes:
- Store
- Defined in:
- lib/rails_metrics/orm/active_record.rb
Overview
Include in your model to store metrics. For ActiveRecord, you need the following setup:
script/generate model Metric script/generate name:string duration:integer
request_id:integer parent_id:integer payload:text started_at:datetime created_at:datetime --skip-timestamps
You can use any model name you wish. Next, you need to include RailsMetrics::ORM::ActiveRecord:
class Metric < ActiveRecord::Base
include RailsMetrics::ORM::ActiveRecord
end
Defined Under Namespace
Modules: ClassMethods
Constant Summary
Constants included from Store
Method Summary
Methods included from Store
#child_of?, #children, #configure, #destroy, #duration_in_ms, #duration_in_us, #exclusive_duration, #exclusive_duration_in_ms, #exclusive_duration_in_us, #parent_of?, #rack_request?, #save_metrics!