AddMetadata adds the new metadata to the map. if it already exists use CombineSearchResults to combine the two
(meta *tempopb.TraceSearchMetadata)
| 63 | // AddMetadata adds the new metadata to the map. if it already exists |
| 64 | // use CombineSearchResults to combine the two |
| 65 | func (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 | |
| 80 | func (c *anyCombiner) Count() int { |
| 81 | return len(c.trs) |
no test coverage detected