From 711f21a6f5b0dab515bf15ecf21434cd8eb05648 Mon Sep 17 00:00:00 2001 From: Mahad Zaryab Date: Tue, 17 Dec 2024 22:08:05 -0500 Subject: [PATCH] Create Error Variable Signed-off-by: Mahad Zaryab --- cmd/query/app/querysvc/adjuster/spaniduniquifier.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/query/app/querysvc/adjuster/spaniduniquifier.go b/cmd/query/app/querysvc/adjuster/spaniduniquifier.go index 477c01ef07b..ea15113de33 100644 --- a/cmd/query/app/querysvc/adjuster/spaniduniquifier.go +++ b/cmd/query/app/querysvc/adjuster/spaniduniquifier.go @@ -13,8 +13,8 @@ import ( "github.com/jaegertracing/jaeger/internal/jptrace" ) -const ( - warningTooManySpans = "cannot assign unique span ID, too many spans in the trace" +var ( + errTooManySpans = errors.New("cannot assign unique span ID, too many spans in the trace") ) // SpanIDUniquifier returns an adjuster that changes span ids for server @@ -142,7 +142,7 @@ func (d *spanIDDeduper) makeUniqueSpanID() (pcommon.SpanID, error) { } id = incrementSpanID(id) } - return pcommon.NewSpanIDEmpty(), errors.New(warningTooManySpans) + return pcommon.NewSpanIDEmpty(), errTooManySpans } func incrementSpanID(spanID pcommon.SpanID) pcommon.SpanID {