diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index a6673afaedd179332535755c9eaf62fa7e65223b..29863b5c65acafe43c69f7c2425324a454de3821 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,7 +1,7 @@ * `process_action.action_controller` notifications now include the following in their payloads: * `:request` - the `ActionDispatch::Request` - * `:location` - the `Location` response header + * `:response` - the `ActionDispatch::Response` *George Claghorn* diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb index 8154170b6ab6bd2f2b2661822c4ae7cf1ec7199a..c3490c29665bcf48d49bb2530c6e412d409e0310 100644 --- a/actionpack/lib/action_controller/metal/instrumentation.rb +++ b/actionpack/lib/action_controller/metal/instrumentation.rb @@ -20,20 +20,20 @@ def process_action(*) raw_payload = { controller: self.class.name, action: action_name, + request: request, params: request.filtered_parameters, headers: request.headers, format: request.format.ref, method: request.request_method, - path: request.fullpath, - request: request + path: request.fullpath } ActiveSupport::Notifications.instrument("start_processing.action_controller", raw_payload) ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload| result = super + payload[:response] = response payload[:status] = response.status - payload[:location] = response.filtered_location result ensure append_info_to_payload(payload)