Class: Appsignal::Rack::PathableBodyWrapper
- Inherits:
-
EnumerableBodyWrapper
- Object
- BodyWrapper
- EnumerableBodyWrapper
- Appsignal::Rack::PathableBodyWrapper
- Defined in:
- lib/appsignal/rack/body_wrapper.rb
Overview
Having "to_path" on a body allows Rack to serve out a static file, or to pass that file to the downstream webserver for sending using X-Sendfile
Constant Summary
Constants inherited from BodyWrapper
Instance Method Summary collapse
Methods inherited from EnumerableBodyWrapper
Methods inherited from BodyWrapper
#close, #initialize, #method_missing, #respond_to_missing?, wrap
Constructor Details
This class inherits a constructor from Appsignal::Rack::BodyWrapper
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Appsignal::Rack::BodyWrapper
Instance Method Details
#to_path ⇒ Object
180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/appsignal/rack/body_wrapper.rb', line 180 def to_path Appsignal.instrument( "process_response_body.rack", "Process Rack response body (#to_path)", :opentelemetry_scope => ["appsignal-ruby/rack", Appsignal::VERSION] ) do @body.to_path end rescue *IGNORED_ERRORS # Do not report raise rescue Exception => error appsignal_report_error(error) raise error end |