Sha256: ccec3c288b6d03b99efd0dea407230ca38bd82d750a9fd0ec324a050a0c72113

Contents?: true

Size: 1.17 KB

Versions: 26

Compression:

Stored size: 1.17 KB

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

# Our Padrino instrumentation relies heavily on the fact that Padrino is
# built on Sinatra. Although it wires up a lot of its own routing logic,
# we only need to patch into Padrino's dispatch to get things started.
#
# Parts of the Sinatra instrumentation (such as the TransactionNamer) are
# aware of Padrino as a potential target in areas where both Sinatra and
# Padrino run through the same code.

require_relative 'sinatra'
require_relative 'padrino/chain'
require_relative 'padrino/instrumentation'
require_relative 'padrino/prepend'

DependencyDetection.defer do
  @name = :padrino
  configure_with :sinatra

  depends_on { defined?(Padrino) && defined?(Padrino::Routing::InstanceMethods) }

  executes do
    NewRelic::Agent.logger.info('Installing Padrino instrumentation')
    if use_prepend?
      prepend_instrument Padrino::Application, NewRelic::Agent::Instrumentation::PadrinoTracer::Prepend
    else
      chain_instrument NewRelic::Agent::Instrumentation::PadrinoTracer::Chain
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
newrelic_rpm-9.14.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.13.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.12.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.11.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.10.2 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.10.1 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.10.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.9.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.8.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.7.1 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.7.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.6.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.5.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.4.2 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.4.1 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.4.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.3.1 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.3.0 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.2.2 lib/new_relic/agent/instrumentation/padrino.rb
newrelic_rpm-9.2.1 lib/new_relic/agent/instrumentation/padrino.rb