From 8b55ec1052bdc705525c095ebe704ff590164e2f Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 18 Oct 2024 10:54:16 -0700 Subject: [PATCH] Remove String and Size methods of TraceID and SpanID (#1199) --- sdk/telemetry/id.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/sdk/telemetry/id.go b/sdk/telemetry/id.go index 7245d9fbb..438581611 100644 --- a/sdk/telemetry/id.go +++ b/sdk/telemetry/id.go @@ -17,19 +17,6 @@ const ( // TraceID is a custom data type that is used for all trace IDs. type TraceID [traceIDSize]byte -// String returns the hex string representation form of a TraceID. -func (tid TraceID) String() string { - return hex.EncodeToString(tid[:]) -} - -// Size returns the size of the data to serialize. -func (tid TraceID) Size() int { - if tid.IsEmpty() { - return 0 - } - return traceIDSize -} - // IsEmpty returns false if id contains at least one non-zero byte. func (tid TraceID) IsEmpty() bool { return tid == [traceIDSize]byte{} @@ -53,19 +40,6 @@ func (tid *TraceID) UnmarshalJSON(data []byte) error { // SpanID is a custom data type that is used for all span IDs. type SpanID [spanIDSize]byte -// String returns the hex string representation form of a SpanID. -func (sid SpanID) String() string { - return hex.EncodeToString(sid[:]) -} - -// Size returns the size of the data to serialize. -func (sid SpanID) Size() int { - if sid.IsEmpty() { - return 0 - } - return spanIDSize -} - // IsEmpty returns true if the span ID contains at least one non-zero byte. func (sid SpanID) IsEmpty() bool { return sid == [spanIDSize]byte{}