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

Method AddMetadata

pkg/traceql/combine.go:65–78  ·  view source on GitHub ↗

AddMetadata adds the new metadata to the map. if it already exists use CombineSearchResults to combine the two

(meta *tempopb.TraceSearchMetadata)

Source from the content-addressed store, hash-verified

63// AddMetadata adds the new metadata to the map. if it already exists
64// use CombineSearchResults to combine the two
65func (c *anyCombiner) AddMetadata(meta *tempopb.TraceSearchMetadata) bool {
66 if existing, ok := c.trs[meta.TraceID]; ok {
67 combineSearchResults(existing, meta)
68 return true
69 }
70
71 // if we don't have too many
72 if c.IsCompleteFor(0) {
73 return false
74 }
75
76 c.trs[meta.TraceID] = meta
77 return true
78}
79
80func (c *anyCombiner) Count() int {
81 return len(c.trs)

Callers 1

addSpansetMethod · 0.95

Calls 2

IsCompleteForMethod · 0.95
combineSearchResultsFunction · 0.85

Tested by

no test coverage detected