Class: Rory::Request
- Inherits:
-
Rack::Request
- Object
- Rack::Request
- Rory::Request
- Defined in:
- lib/rory/request.rb
Instance Method Summary collapse
-
#uuid ⇒ Object
Returns the unique request id, which is based off either the X-Request-Id header that can be generated by a firewall, load balancer, or web server or by the RequestId middleware (which sets the rory.request_id environment variable).
Instance Method Details
#uuid ⇒ Object
Returns the unique request id, which is based off either the X-Request-Id header that can be generated by a firewall, load balancer, or web server or by the RequestId middleware (which sets the rory.request_id environment variable).
This unique ID is useful for tracing a request from end-to-end as part of logging or debugging. This relies on the rack variable set by the Rory::RequestId middleware.
9 10 11 |
# File 'lib/rory/request.rb', line 9 def uuid @uuid ||= env["rory.request_id"] end |