Skip to content

Commit

Permalink
Defer loading ActionView::Base until it's necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
jdelStrother committed Apr 29, 2021
1 parent 0962dc2 commit d6d046e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
end

executes do
NewRelic::Agent::Instrumentation::ActionViewSubscriber.subscribe(/render_.+\.action_view$/)
NewRelic::Agent::PrependSupportability.record_metrics_for(::ActionView::Base, ::ActionView::Template, ::ActionView::Renderer)
ActiveSupport.on_load(:action_view) do
NewRelic::Agent::Instrumentation::ActionViewSubscriber.subscribe(/render_.+\.action_view$/)
NewRelic::Agent::PrependSupportability.record_metrics_for(::ActionView::Base, ::ActionView::Template, ::ActionView::Renderer)
end
end
end

0 comments on commit d6d046e

Please sign in to comment.