sdk-go
sdk-go copied to clipboard
opentelemetry: log TraceID/SpanID as hex strings (fixes #2103)
Fix cosmetic logging bug: ensure OpenTelemetry TraceID/SpanID are logged as hex strings instead of byte slices. Minimal change: call .String() on both.\n\nValidation: ran go test ./... successfully.\n\nAffected file: contrib/opentelemetry/tracing_interceptor.go
closes #2103
Added note.
Was able to recreate using slog and otel traceid on Go 1.21
For loggin SpanID and TraceID with slog you should be setting up https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/bridges/otelslog or an alternative