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

Method addSpanset

pkg/traceql/combine.go:48–61  ·  view source on GitHub ↗

addSpanset adds a new spanset to the combiner. It only performs the asTraceSearchMetadata conversion if the spanset will be added

(ss *Spanset)

Source from the content-addressed store, hash-verified

46// addSpanset adds a new spanset to the combiner. It only performs the asTraceSearchMetadata
47// conversion if the spanset will be added
48func (c *anyCombiner) addSpanset(ss *Spanset) {
49 // if it's already in the list, then we should add it
50 if _, ok := c.trs[util.TraceIDToHexString(ss.TraceID)]; ok {
51 c.AddMetadata(asTraceSearchMetadata(ss))
52 return
53 }
54
55 // if we don't have too many
56 if c.IsCompleteFor(0) {
57 return
58 }
59
60 c.AddMetadata(asTraceSearchMetadata(ss))
61}
62
63// AddMetadata adds the new metadata to the map. if it already exists
64// use CombineSearchResults to combine the two

Callers

nothing calls this directly

Calls 4

AddMetadataMethod · 0.95
IsCompleteForMethod · 0.95
TraceIDToHexStringFunction · 0.92
asTraceSearchMetadataFunction · 0.85

Tested by

no test coverage detected