aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching
diff options
context:
space:
mode:
authorDaniel Schierbeck <dasch@zendesk.com>2014-02-21 10:28:51 +0000
committerDaniel Schierbeck <dasch@zendesk.com>2014-05-10 09:35:29 +0000
commit92fbbf67e339f24f9203d9927c028ee052685377 (patch)
tree9c8def33aac3722be2865af8bd842d5b05b0eda9 /actionpack/lib/action_controller/caching
parentb231825f3e0b569e5ca1426833749b5c6325ba14 (diff)
downloadrails-92fbbf67e339f24f9203d9927c028ee052685377.tar.gz
rails-92fbbf67e339f24f9203d9927c028ee052685377.tar.bz2
rails-92fbbf67e339f24f9203d9927c028ee052685377.zip
Add controller and action name to the instrumentation payload
Diffstat (limited to 'actionpack/lib/action_controller/caching')
-rw-r--r--actionpack/lib/action_controller/caching/fragments.rb8
1 files changed, 7 insertions, 1 deletions
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