Module: Rails::Instrumentation::ActionViewSubscriber
- Includes:
- Subscriber
- Defined in:
- lib/rails/instrumentation/subscribers/action_view_subscriber.rb
Constant Summary collapse
- EVENT_NAMESPACE =
'action_view'.freeze
- EVENTS =
%w[ render_template render_partial render_collection ].freeze
- BASE_TAGS =
rubocop:disable Style/MutableConstant
{ 'component' => 'ActionView' }
Class Method Summary collapse
Methods included from Subscriber
Class Method Details
.render_collection(event) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/rails/instrumentation/subscribers/action_view_subscriber.rb', line 36 def render_collection(event) = ( 'template.identifier' => event.payload[:identifier], 'template.count' => event.payload[:count] ) ['template.cache_hits'] = event.payload[:cache_hits] if event.payload.key? :cache_hits Utils.trace_notification(event: event, tags: ) end |
.render_partial(event) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/rails/instrumentation/subscribers/action_view_subscriber.rb', line 28 def render_partial(event) = ( 'partial.identifier' => event.payload[:identifier] ) Utils.trace_notification(event: event, tags: ) end |
.render_template(event) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/rails/instrumentation/subscribers/action_view_subscriber.rb', line 19 def render_template(event) = ( 'template.identifier' => event.payload[:identifier], 'template.layout' => event.payload[:layout] ) Utils.trace_notification(event: event, tags: ) end |