Documentation
¶
Index ¶
Constants ¶
View Source
const ( LoggerKey LoggerContextKey = "logger" TraceIDKey TraceIDContextKey = "requestId" TraceIDHeader string = "X-Trace-Id" RequestSettingsKey RequestContextKey = "requestSettings" )
Variables ¶
This section is empty.
Functions ¶
func GetTraceID ¶ added in v0.27.5
GetTraceID retrieves the trace ID from the context. If no trace ID is present, it returns an empty string.
func WithExistingOrNewTraceID ¶ added in v0.27.5
WithExistingOrNewTraceID returns a context with a trace ID. If the context already has a trace ID, it is reused.
Types ¶
type LoggerContextKey ¶
type LoggerContextKey string
type RequestContextKey ¶
type RequestContextKey string
type TraceIDContextKey ¶ added in v0.27.2
type TraceIDContextKey string
Click to show internal directories.
Click to hide internal directories.