Sha256: e3f8b98450ac6ba3d65af39534bb971c92fa2a711ad549de2d1a66a54a3e0aa1
Contents?: true
Size: 1.23 KB
Versions: 4
Compression:
Stored size: 1.23 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 supportability_name = NewRelic::Agent::Instrumentation::Padrino::INSTRUMENTATION_NAME if use_prepend? prepend_instrument Padrino::Application, NewRelic::Agent::Instrumentation::PadrinoTracer::Prepend, supportability_name else chain_instrument NewRelic::Agent::Instrumentation::PadrinoTracer::Chain, supportability_name end end end
Version data entries
4 entries across 4 versions & 1 rubygems