instance method
request_id
Ruby on Rails edge
Since v5.0.7.2Signature
request_id()
Returns the unique request id, which is based on 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 `action_dispatch.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
ActionDispatch::RequestId middleware.
: () -> String?
Source
# File actionpack/lib/action_dispatch/http/request.rb, line 453
def request_id
get_header ACTION_DISPATCH_REQUEST_ID
end
Defined in actionpack/lib/action_dispatch/http/request.rb line 453
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request