Expand description
Per-request correlation id.
request_id is an axum middleware that assigns every request a
RequestId (honouring an inbound x-request-id when present), stores it in
the request extensions for extractors and the permission guard to read, and
echoes it on the response. Problem carries it in
the body so a client can quote one id to an operator.
Structs§
- Request
Id - A request’s correlation id, stored in the request extensions by
request_idand readable by extractors viaRequestIdExt.
Constants§
- REQUEST_
ID_ HEADER - The header carrying the correlation id, in and out.
Traits§
- Request
IdExt - Convenience to read the
RequestIdout of a set of request extensions.
Functions§
- request_
id - Middleware that assigns a
RequestId, stores it in the extensions and echoes it on the response’sx-request-idheader. Reuses an inboundx-request-idwhen the client sent a syntactically valid one.