Module: NewRelic::Agent::Instrumentation::Sinatra::Build::Chain

Defined in:
lib/new_relic/agent/instrumentation/sinatra/chain.rb

Class Method Summary collapse

Class Method Details

.instrument!Object



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/new_relic/agent/instrumentation/sinatra/chain.rb', line 39

def self.instrument!
  ::Sinatra::Base.class_eval do
    class << self
      def build_with_newrelic(*args, &block)
        build_with_tracing(*args) do
          build_without_newrelic(*args, &block)
        end
      end
      alias build_without_newrelic build
      alias build build_with_newrelic
    end
  end
end