Sha256: 3ab3996070e8c664937cde5fae9d0328d1ca3dc82801496c6d41ecc00dcd2345

Contents?: true

Size: 1.18 KB

Versions: 20

Compression:

Stored size: 1.18 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

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

          alias_method(:_roda_handle_main_route_without_tracing, :_roda_handle_main_route)

          def _roda_handle_main_route(*args)
            _roda_handle_main_route_with_tracing(*args) do
              _roda_handle_main_route_without_tracing(*args)
            end
          end
        end
      end
    end

    module Build
      module Chain
        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
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
newrelic_rpm-9.17.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.16.1 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.16.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.15.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.14.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.13.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.12.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.11.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.10.2 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.10.1 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.10.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.9.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.8.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.7.1 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.7.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.6.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.5.0 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.4.2 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.4.1 lib/new_relic/agent/instrumentation/roda/chain.rb
newrelic_rpm-9.4.0 lib/new_relic/agent/instrumentation/roda/chain.rb