class Lucky::RequestIdHandler
- Lucky::RequestIdHandler
- Reference
- Object
Overview
Sets the HTTP::Server::Context#request_id value
Configure the set_request_id
Proc to return a
new String
value on each request. This can be
used to group logs and such that may be ran asynchronously.
Lucky::RequestIdHandler.configure do |settings|
settings.set_request_id = ->(context : HTTP::Server::Context) {
UUID.random.to_s
}
end
Included Modules
- Habitat::SettingsHelpers
- Habitat::TempConfig
- HTTP::Handler
Defined in:
lucky/request_id_handler.crConstant Summary
-
HABITAT_SETTINGS =
[{decl: set_request_id : Proc(HTTP::Server::Context, String) | ::Nil = nil, example: nil, validation: nil}] of Nil