Sha256: 39326b92cb2d4e11437204dd8734ad4659a7fd96a6de151c4862bbe53390db47

Contents?: true

Size: 1009 Bytes

Versions: 2

Compression:

Stored size: 1009 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.

module NewRelic::Agent::Instrumentation
  module Rack
    
    module URLMap
      module Prepend
        def initialize(map = {})
          super ::NewRelic::Agent::Instrumentation::RackURLMap.generate_traced_map(map)
        end
      end
    end

    module Prepend
      include ::NewRelic::Agent::Instrumentation::RackBuilder

      def self.prepended builder_class
        NewRelic::Agent::Instrumentation::RackBuilder.track_deferred_detection builder_class
      end

      def to_app
        with_deferred_dependency_detection { super }
      end

      def run(app, *args)
        run_with_tracing(app) { |wrapped_app| super(wrapped_app, *args) }
      end

      def use(middleware_class, *args, &blk)
        use_with_tracing(middleware_class) { |wrapped_class| super(wrapped_class, *args, &blk) }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
newrelic_rpm-7.1.0 lib/new_relic/agent/instrumentation/rack/prepend.rb
newrelic_rpm-7.0.0 lib/new_relic/agent/instrumentation/rack/prepend.rb