Adds instrumentation to several ends in ActionController::Base. It also provides some hooks related with process_action, this allows an ORM like Active Record and/or DataMapper to plug in ActionController and show related information.
Check ActiveRecord::Railties::ControllerRuntime for an example.
Methods
Included Modules
- Rails START:includes
Classes and Modules
Instance Public methods
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 17 17: def process_action(*args) 18: raw_payload = { 19: :controller => self.class.name, 20: :action => self.action_name, 21: :params => request.filtered_parameters, 22: :format => request.format.try(:ref), 23: :method => request.method, 24: :path => (request.fullpath rescue "unknown") 25: } 26: 27: ActiveSupport::Notifications.instrument("start_processing.action_controller", raw_payload.dup) 28: 29: ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload| 30: result = super 31: payload[:status] = response.status 32: append_info_to_payload(payload) 33: result 34: end 35: end
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 58 58: def redirect_to(*args) 59: ActiveSupport::Notifications.instrument("redirect_to.action_controller") do |payload| 60: result = super 61: payload[:status] = response.status 62: payload[:location] = response.location 63: result 64: end 65: end