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

Function sortSpanAttrs

tempodb/encoding/vparquet5/block_traceql_meta_test.go:905–920  ·  view source on GitHub ↗
(s *span)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected