fixup panic on otel attribute.KeyValue label
All checks were successful
test / test (push) Successful in 1m45s
All checks were successful
test / test (push) Successful in 1m45s
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
|||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
"go.unistack.org/micro/v3/metadata"
|
"go.unistack.org/micro/v3/metadata"
|
||||||
"go.unistack.org/micro/v3/tracer"
|
"go.unistack.org/micro/v3/tracer"
|
||||||
"go.unistack.org/micro/v3/util/sort"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ tracer.Tracer = &otTracer{}
|
var _ tracer.Tracer = &otTracer{}
|
||||||
@@ -183,7 +182,7 @@ func (os *otSpan) Finish(opts ...tracer.SpanOption) {
|
|||||||
options.Labels = options.Labels[:len(options.Labels)-1]
|
options.Labels = options.Labels[:len(options.Labels)-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
os.opts.Labels = sort.Uniq(os.opts.Labels)
|
// options.Labels = sort.Uniq(options.Labels)
|
||||||
|
|
||||||
l := len(options.Labels)
|
l := len(options.Labels)
|
||||||
for idx := 0; idx < l; idx++ {
|
for idx := 0; idx < l; idx++ {
|
||||||
|
Reference in New Issue
Block a user