diff --git a/pkg/core/xtrace/propagation.go b/pkg/core/xtrace/propagation.go index 92751d84ed..faaf41b403 100644 --- a/pkg/core/xtrace/propagation.go +++ b/pkg/core/xtrace/propagation.go @@ -17,7 +17,7 @@ const ( traceID128bitsWidth = 128 / 4 spanIDWidth = 64 / 4 - idPaddingChar = "0" + // idPaddingChar = "0" flagsDebug = 0x02 flagsSampled = 0x01 @@ -96,11 +96,11 @@ func extract(ctx context.Context, headerVal string) (context.Context, trace.Span if len(id) > traceID128bitsWidth { return ctx, empty, errInvalidTraceIDLength } - // padding when length is less than 32 - if len(id) < traceID128bitsWidth { - padCharCount := traceID128bitsWidth - len(id) - id = strings.Repeat(idPaddingChar, padCharCount) + id - } + // // padding when length is less than 32 + // if len(id) < traceID128bitsWidth { + // padCharCount := traceID128bitsWidth - len(id) + // id = strings.Repeat(idPaddingChar, padCharCount) + id + // } scc.TraceID, err = trace.TraceIDFromHex(id) if err != nil { return ctx, empty, errMalformedTraceID @@ -113,11 +113,11 @@ func extract(ctx context.Context, headerVal string) (context.Context, trace.Span if len(id) > spanIDWidth { return ctx, empty, errInvalidSpanIDLength } - // padding when length is less than 16 - if len(id) < spanIDWidth { - padCharCount := spanIDWidth - len(id) - id = strings.Repeat(idPaddingChar, padCharCount) + id - } + // // padding when length is less than 16 + // if len(id) < spanIDWidth { + // padCharCount := spanIDWidth - len(id) + // id = strings.Repeat(idPaddingChar, padCharCount) + id + // } scc.SpanID, err = trace.SpanIDFromHex(id) if err != nil { return ctx, empty, errMalformedSpanID