Request id
A request ID is a unique identifier generated or accepted at the HTTP boundary for an incoming request. It is stored in the request context, returned in the X-Request-Id response header, and attached to log entries so operations belonging to the same request can be correlated.
Minimal example
id := middleware.GetReqID(r.Context())
logger := base.With("request_id", id)