Documentation
¶
Index ¶
Constants ¶
View Source
const HeaderRequestID = "X-Request-Id"
HeaderRequestID carries the caller's trace id; it is echoed back as the request's trace id.
Variables ¶
This section is empty.
Functions ¶
func InjectCommonContextVars ¶
InjectCommonContextVars ensures ctx carries a non-empty trace id and a remote IP value (empty when unknown), so downstream logging can rely on both keys being present.
func InjectCommonRequestContextVars ¶
InjectCommonRequestContextVars returns the request with a context carrying the trace id from the X-Request-Id header (a fresh UUID when absent) and the caller's remote IP.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.