module NewRelic::Agent::Instrumentation::ViewComponent::Chain

Public Class Methods

instrument!() click to toggle source
# File lib/new_relic/agent/instrumentation/view_component/chain.rb, line 7
def self.instrument!
  ::ViewComponent::Base.class_eval do
    include NewRelic::Agent::Instrumentation::ViewComponent

    alias_method(:render_in_without_tracing, :render_in)

    def render_in(*args)
      render_in_with_tracing(*args) do
        render_in_without_tracing(*args)
      end
    end
  end
end

Public Instance Methods

render_in(*args) click to toggle source
# File lib/new_relic/agent/instrumentation/view_component/chain.rb, line 13
def render_in(*args)
  render_in_with_tracing(*args) do
    render_in_without_tracing(*args)
  end
end