class Lucky::RequestIdHandler


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) {

Included Modules

Defined in:


Constant Summary

HABITAT_SETTINGS = [{decl: set_request_id : Proc(HTTP::Server::Context, String) | ::Nil = nil, example: nil, validation: nil}] of Nil

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

blank? : Bool blank?, present? : Bool present?

Class Method Detail

def self.configure(&) #

[View source]
def self.settings #

[View source]

Instance Method Detail

def call(context) #

[View source]
def settings #

[View source]