MCPcopy
hub / github.com/grafana/tempo / sortSpanAttrs

Function sortSpanAttrs

tempodb/encoding/vparquet3/block_traceql_meta_test.go:589–604  ·  view source on GitHub ↗
(s *span)

Source from the content-addressed store, hash-verified

587}
588
589func sortSpanAttrs(s *span) {
590 // create sort func
591 sortFn := func(a, b attrVal) bool {
592 return a.a.String() < b.a.String()
593 }
594 // sort
595 sort.Slice(s.spanAttrs, func(i, j int) bool {
596 return sortFn(s.spanAttrs[i], s.spanAttrs[j])
597 })
598 sort.Slice(s.resourceAttrs, func(i, j int) bool {
599 return sortFn(s.resourceAttrs[i], s.resourceAttrs[j])
600 })
601 sort.Slice(s.traceAttrs, func(i, j int) bool {
602 return sortFn(s.traceAttrs[i], s.traceAttrs[j])
603 })
604}

Callers 1

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected