Module: ScoutApm::Instruments::ActionView::ActionViewCollectionRendererInstruments
- Defined in:
- lib/scout_apm/instruments/action_view.rb
Overview
In Rails 6.1 collection was moved to CollectionRenderer.
Instance Method Summary collapse
Instance Method Details
#render_collection(*args, **kwargs) ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/scout_apm/instruments/action_view.rb', line 84 def render_collection(*args, **kwargs) req = ScoutApm::RequestManager.lookup maybe_template = args[3] template_name ||= maybe_template.virtual_path rescue nil template_name ||= "Unknown Collection" layer_name = template_name + "/Rendering" layer = ScoutApm::Layer.new("View", layer_name) layer.subscopable! begin req.start_layer(layer) if ScoutApm::Agent.instance.context.environment.supports_kwarg_delegation? super(*args, **kwargs) else super(*args) end ensure req.stop_layer end end |