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

Function sortSpanAttrs

tempodb/encoding/vparquet4/block_traceql_meta_test.go:906–921  ·  view source on GitHub ↗
(s *span)

Source from the content-addressed store, hash-verified

904}
905
906func sortSpanAttrs(s *span) {
907 // create sort func
908 sortFn := func(a, b attrVal) bool {
909 return a.a.String() < b.a.String()
910 }
911 // sort
912 sort.Slice(s.spanAttrs, func(i, j int) bool {
913 return sortFn(s.spanAttrs[i], s.spanAttrs[j])
914 })
915 sort.Slice(s.resourceAttrs, func(i, j int) bool {
916 return sortFn(s.resourceAttrs[i], s.resourceAttrs[j])
917 })
918 sort.Slice(s.traceAttrs, func(i, j int) bool {
919 return sortFn(s.traceAttrs[i], s.traceAttrs[j])
920 })
921}

Callers 1

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected