diff options
4 files changed, 8 insertions, 10 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 5b4a8c0751..b9a01356ba 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -510,7 +510,7 @@ module ActionMailer #:nodoc: begin ActiveSupport::Notifications.instrument("action_mailer.deliver", - :template => template, :mailer_name => mailer_name) do |payload| + :template => template, :mailer => self.class.name) do |payload| self.class.set_payload_for_mail(payload, mail) self.delivery_method.perform_delivery(mail) if perform_deliveries end diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb index d2f28f7e38..ec278ca783 100644 --- a/actionpack/lib/action_view/render/rendering.rb +++ b/actionpack/lib/action_view/render/rendering.rb @@ -109,10 +109,7 @@ module ActionView end def _render_layout(layout, locals, &block) - ActiveSupport::Notifications.instrument("action_view.render_layout", - :identifier => layout.identifier) do - layout.render(self, locals){ |*name| _layout_for(*name, &block) } - end + layout.render(self, locals){ |*name| _layout_for(*name, &block) } end end end diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index d06543d700..2f0ccd7dae 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -106,9 +106,10 @@ module ActiveResource private # Makes a request to the remote service. def request(method, path, *arguments) - result = ActiveSupport::Notifications.instrument("active_resource.request", - :method => method, :path => path, :site => site) do |payload| - payload[:result] = http.send(method, path, *arguments) + result = ActiveSupport::Notifications.instrument("active_resource.request") do |payload| + payload[:method] = method + payload[:request_uri] = "#{site.scheme}://#{site.host}:#{site.port}#{path}" + payload[:result] = http.send(method, path, *arguments) end handle_response(result) rescue Timeout::Error => e diff --git a/activeresource/lib/active_resource/railties/subscriber.rb b/activeresource/lib/active_resource/railties/subscriber.rb index 42c108d702..fb98061b71 100644 --- a/activeresource/lib/active_resource/railties/subscriber.rb +++ b/activeresource/lib/active_resource/railties/subscriber.rb @@ -2,8 +2,8 @@ module ActiveResource module Railties class Subscriber < Rails::Subscriber def request(event) - result, site = event.payload[:result], event.payload[:site] - info "#{event.payload[:method].to_s.upcase} #{site.scheme}://#{site.host}:#{site.port}#{event.payload[:path]}" + result = event.payload[:result] + info "#{event.payload[:method].to_s.upcase} #{event.payload[:request_uri]}" info "--> %d %s %d (%.1fms)" % [result.code, result.message, result.body.to_s.length, event.duration] end |