Class: SystemMetrics::Instrument::ActionController
- Defined in:
- lib/system_metrics/instrument/action_controller.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #ignore?(event) ⇒ Boolean
-
#initialize ⇒ ActionController
constructor
A new instance of ActionController.
- #prepare(event) ⇒ Object
Methods inherited from Base
#handles?, #mapped_paths, #prune_path
Constructor Details
#initialize ⇒ ActionController
Returns a new instance of ActionController.
5 6 7 |
# File 'lib/system_metrics/instrument/action_controller.rb', line 5 def initialize super /\.action_controller$/ end |
Instance Method Details
#ignore?(event) ⇒ Boolean
9 10 11 |
# File 'lib/system_metrics/instrument/action_controller.rb', line 9 def ignore?(event) event.name != 'process_action.action_controller' end |
#prepare(event) ⇒ Object
13 14 15 16 |
# File 'lib/system_metrics/instrument/action_controller.rb', line 13 def prepare(event) event.payload[:end_point] = "#{event.payload.delete(:controller)}##{event.payload.delete(:action)}" event.payload.slice!(:path, :method, :params, :db_runtime, :view_runtime, :end_point) end |