From d57d26780ee18df8ca5bc12008a53ffb28b26b36 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 21 Sep 2026 17:01:14 +0200 Subject: [PATCH] otel: WithTraceIDField: add GoDoc Signed-off-by: Sebastiaan van Stijn --- otel/log.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/otel/log.go b/otel/log.go index 3233eff..f470bcd 100644 --- a/otel/log.go +++ b/otel/log.go @@ -56,6 +56,8 @@ func NewLogrusHook(opts ...HookOpt) *LogrusHook { return hook } +// WithTraceIDField configures the hook to add the trace ID of the active span +// to log entries. func WithTraceIDField(enabled bool) HookOpt { return func(h *LogrusHook) { h.enableTraceIDField = enabled