Skip to content

Commit

Permalink
Create Error Variable
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <[email protected]>
  • Loading branch information
mahadzaryab1 committed Dec 18, 2024
1 parent f4811ad commit 711f21a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/query/app/querysvc/adjuster/spaniduniquifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 711f21a

Please sign in to comment.