Sha256: 8663aa674b8e20fddaf13693a740fd41dfb3cf633be2701559739a1b9db1676b

Contents?: true

Size: 696 Bytes

Versions: 2

Compression:

Stored size: 696 Bytes

Contents

# encoding: utf-8
# 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 'tilt/instrumentation'
require_relative 'tilt/chain'
require_relative 'tilt/prepend'

DependencyDetection.defer do
  named :tilt

  depends_on { defined?(::Tilt) }

  executes do
    ::NewRelic::Agent.logger.info('Installing Tilt instrumentation')
  end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
newrelic_rpm-8.10.1 lib/new_relic/agent/instrumentation/tilt.rb
newrelic_rpm-8.10.0 lib/new_relic/agent/instrumentation/tilt.rb