Sha256: c0755eb6a8bc88863a732943c289b08e4aa4bca9618326c820fbb0d94ef3384d

Contents?: true

Size: 722 Bytes

Versions: 4

Compression:

Stored size: 722 Bytes

Contents

# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

require_relative 'view_component/instrumentation'
require_relative 'view_component/chain'
require_relative 'view_component/prepend'

DependencyDetection.defer do
  named :view_component

  depends_on do
    defined?(ViewComponent) &&
      ViewComponent::Base.method_defined?(:render_in)
  end

  executes do
    if use_prepend?
      prepend_instrument ViewComponent::Base, NewRelic::Agent::Instrumentation::ViewComponent::Prepend
    else
      chain_instrument NewRelic::Agent::Instrumentation::ViewComponent::Chain
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
newrelic_rpm-9.17.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.16.1 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.16.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.15.0 lib/new_relic/agent/instrumentation/view_component.rb