Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnID ¶
func NewConnID() string
NewConnID returns a 16-character random hex string for per-connection tracing.
func ParseLevel ¶
ParseLevel converts a case-insensitive level name to slog.Level.
Types ¶
type OTelHandler ¶ added in v0.6.1
type OTelHandler struct {
// contains filtered or unexported fields
}
OTelHandler wraps a slog.Handler and injects OpenTelemetry trace context (trace_id, span_id, trace_flags) into log records when a valid span is present in the context.
func NewOTelHandler ¶ added in v0.6.1
func NewOTelHandler(inner slog.Handler) *OTelHandler
NewOTelHandler returns a handler that enriches log records with trace context.
Click to show internal directories.
Click to hide internal directories.