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

Function sortAttrs

tempodb/encoding/vparquet4/block_traceql_test.go:1300–1310  ·  view source on GitHub ↗
(attrs []attrVal)

Source from the content-addressed store, hash-verified

1298}
1299
1300func sortAttrs(attrs []attrVal) {
1301 sort.SliceStable(attrs, func(i, j int) bool {
1302 is := attrs[i].a.String()
1303 js := attrs[j].a.String()
1304 if is == js {
1305 // Compare by value
1306 return attrs[i].s.String() < attrs[j].s.String()
1307 }
1308 return is < js
1309 })
1310}
1311
1312func trimArrayAttrs(in []Attribute) []Attribute {
1313 out := []Attribute{}

Callers 2

flattenForSelectAllFunction · 0.70

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected