Sha256: 1b37c0abab5aa518abf7b414d6f9681d09af341387632cb5706000177f167b6a

Contents?: true

Size: 799 Bytes

Versions: 11

Compression:

Stored size: 799 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
    NewRelic::Agent.logger.info('Installing ViewComponent instrumentation')

    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

11 entries across 11 versions & 1 rubygems

Version Path
newrelic_rpm-9.14.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.13.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.12.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.11.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.10.2 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.10.1 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.10.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.9.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.8.0 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.7.1 lib/new_relic/agent/instrumentation/view_component.rb
newrelic_rpm-9.7.0 lib/new_relic/agent/instrumentation/view_component.rb