Skip to content

Commit a37c87a

Browse files
authored
Merge pull request #94 from linuxboot/bugfix/trace_id_not_a_tag
fix(xcontext): TraceID is a Field, not a Tag
2 parents 5c0ebe9 + c304cd5 commit a37c87a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/xcontext/context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import (
1616
"sync"
1717
"time"
1818

19+
"github.com/google/uuid"
1920
"github.com/linuxboot/contest/pkg/xcontext/buildinfo"
2021
"github.com/linuxboot/contest/pkg/xcontext/fields"
2122
"github.com/linuxboot/contest/pkg/xcontext/logger"
2223
"github.com/linuxboot/contest/pkg/xcontext/metrics"
23-
"github.com/google/uuid"
2424
)
2525

2626
var (
@@ -337,7 +337,7 @@ func (ctx *ctxValue) TraceID() TraceID {
337337
func (ctx *ctxValue) WithTraceID(traceID TraceID) Context {
338338
ctxClone := ctx.clone()
339339
ctxClone.traceIDValue = traceID
340-
return ctxClone.WithTag("traceID", traceID)
340+
return ctxClone.WithField("traceID", traceID)
341341
}
342342

343343
func (ctx *ctxValue) considerPendingTags() {

0 commit comments

Comments
 (0)