Sha256: c8a2dcd56528309564f1195ad3921f2125a318807066c472eb02474616deb006

Contents?: true

Size: 1.12 KB

Versions: 18

Compression:

Stored size: 1.12 KB

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.

require 'new_relic/agent/event_listener'
require 'new_relic/rack/agent_middleware'
require 'new_relic/agent/instrumentation/middleware_proxy'

module NewRelic::Rack
  # This middleware is used internally by the agent in the rare case
  # where the disable_middleware_instrumentation configuration setting
  # is true.  In Rails and Sinatra applications this middleware will be
  # automatically injected if necessary.
  #
  # If you have disabled middleware instrumentation and are not using Rails or
  # Sinatra you can include this middleware manually in your config.ru file.
  #
  # All of the functionality of this module resides in the MiddlewareTracing
  # module, which is shared between it and our third party middleware
  # instrumentation.
  #
  # @api public
  #
  class AgentHooks < AgentMiddleware
    def self.needed?
      !NewRelic::Agent.config[:disable_middleware_instrumentation]
    end

    def traced_call(env)
      @app.call(env)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
newrelic_rpm-8.9.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.8.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.7.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.6.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.5.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.4.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.3.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.2.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.1.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-8.0.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-7.2.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-7.1.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-7.0.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-6.15.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-6.14.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-6.13.1 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-6.13.0 lib/new_relic/rack/agent_hooks.rb
newrelic_rpm-6.12.0.367 lib/new_relic/rack/agent_hooks.rb