Class: Appsignal::Rack::EventMiddleware
- Defined in:
- lib/appsignal/rack/event_middleware.rb
Overview
Instrumentation middleware using Rack’s Events module.
A convenience wrapper around our Events middleware, modified to be compatible with streaming bodies, that automatically includes AppSignal’s EventHandler.
We recommend using this in combination with the InstrumentationMiddleware.
This middleware will report the response status code as the ‘response_status` tag on the sample. It will also report the response status as the `response_status` metric.
This middleware will ensure the AppSignal transaction is always completed for every request.
Instance Method Summary collapse
-
#initialize(app) ⇒ EventMiddleware
constructor
A new instance of EventMiddleware.
Methods inherited from Events
Constructor Details
#initialize(app) ⇒ EventMiddleware
Returns a new instance of EventMiddleware.
107 108 109 110 111 |
# File 'lib/appsignal/rack/event_middleware.rb', line 107 def initialize(app) super(app, [Appsignal::Rack::EventHandler.new.tap do |handler| handler.using_appsignal_event_middleware = true end]) end |