Skip to Content Skip to Search
v7.1.0
class ActionDispatch::MiddlewareStack::InstrumentationProxy < Object

ActionDispatch::MiddlewareStack::InstrumentationProxy

This class is used to instrument the execution of a single middleware. It proxies the call method transparently and instruments the method call.

Methods
C
N

Constants

EVENT_NAME = "process_middleware.action_dispatch"
 

Public class methods

new(middleware, class_name)

Permalink
Source code GitHub
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 56
def initialize(middleware, class_name)
  @middleware = middleware

  @payload = {
    middleware: class_name,
  }
end

Public instance methods

call(env)

Permalink
Source code GitHub
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 64
def call(env)
  ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
    @middleware.call(env)
  end
end
Definition files