Documentation
¶
Index ¶
Constants ¶
View Source
const ( RequestIDHeader = "X-Request-ID" B3TraceIDHeader = "X-B3-TraceId" TraceIDHeader = "X-CSGLite-Trace-ID" ThreadIDHeader = "X-CSGLite-Thread-ID" )
Variables ¶
This section is empty.
Functions ¶
func ApplyRequestHeaders ¶
ApplyRequestHeaders propagates correlation only to trusted downstreams.
func ApplyResponseHeaders ¶
func NormalizeB3TraceID ¶
NormalizeB3TraceID enforces the B3 requirement of 64- or 128-bit non-zero lowercase hexadecimal trace identifiers.
func NormalizeID ¶
NormalizeID accepts printable correlation IDs without whitespace or header delimiters. This keeps logs single-line and prevents malformed propagation.
Types ¶
type Values ¶
Values contains correlation identifiers for one inbound API request. TraceID is the logical csghub-lite trace, while B3TraceID identifies the distributed request path through trusted downstream inference services.
func FromHeaders ¶
FromHeaders accepts valid caller identifiers and fills every missing value.
Click to show internal directories.
Click to hide internal directories.