From 61d281a1c1bc03fe87f8505c6ff64f8db836cafd Mon Sep 17 00:00:00 2001 From: Tingmao Wang Date: Tue, 8 Jul 2025 19:50:26 +0100 Subject: [PATCH] oc/exporter: Include the name of a span in the message This makes it easier to read the logs and see which spans are there, especially since WPA sorts the field by its name, independently for each row. Signed-off-by: Tingmao Wang --- internal/oc/exporter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/oc/exporter.go b/internal/oc/exporter.go index 66fc9f4b27..ffa02f1c1f 100644 --- a/internal/oc/exporter.go +++ b/internal/oc/exporter.go @@ -9,7 +9,7 @@ import ( "github.com/Microsoft/hcsshim/internal/logfields" ) -const spanMessage = "Span" +const spanMessage = "Span %s" var _errorCodeKey = logrus.ErrorKey + "Code" @@ -82,5 +82,5 @@ func (le *LogrusExporter) ExportSpan(s *trace.SpanData) { entry.Data = data entry.Time = s.StartTime - entry.Log(level, spanMessage) + entry.Logf(level, spanMessage, s.Name) }