From 92fbbf67e339f24f9203d9927c028ee052685377 Mon Sep 17 00:00:00 2001 From: Daniel Schierbeck Date: Fri, 21 Feb 2014 10:28:51 +0000 Subject: Add controller and action name to the instrumentation payload --- actionpack/lib/action_controller/caching/fragments.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb index 879d5fdd94..9c697d94d5 100644 --- a/actionpack/lib/action_controller/caching/fragments.rb +++ b/actionpack/lib/action_controller/caching/fragments.rb @@ -90,7 +90,13 @@ module ActionController end def instrument_fragment_cache(name, key) # :nodoc: - ActiveSupport::Notifications.instrument("#{name}.action_controller", :key => key){ yield } + payload = { + :controller => controller_name, + :action => action_name, + :key => key + } + + ActiveSupport::Notifications.instrument("#{name}.action_controller", payload){ yield } end end end -- cgit v1.2.3