Class: Rory::Request

Inherits:
Rack::Request
  • Object
show all
Defined in:
lib/rory/request.rb

Instance Method Summary collapse

Instance Method Details

#uuidObject

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