Module: NewRelic::Agent::Instrumentation::Roda::Build::Chain

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

Class Method Summary collapse

Class Method Details

.instrument!Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/new_relic/agent/instrumentation/roda/chain.rb', line 25

def self.instrument!
  ::Roda.class_eval do
    include ::NewRelic::Agent::Instrumentation::Roda::Tracer

    class << self
      alias_method(:build_rack_app_without_tracing, :build_rack_app)

      def build_rack_app
        build_rack_app_with_tracing do
          build_rack_app_without_tracing
        end
      end
    end
  end
end