(trace *tempopb.Trace)
| 27 | } |
| 28 | |
| 29 | func (s *spanIDDeduper) dedupe(trace *tempopb.Trace) *tempopb.Trace { |
| 30 | if trace == nil { |
| 31 | return nil |
| 32 | } |
| 33 | |
| 34 | s.trace = trace |
| 35 | |
| 36 | s.groupSpansByID() |
| 37 | s.dedupeSpanIDs() |
| 38 | |
| 39 | return s.trace |
| 40 | } |
| 41 | |
| 42 | // groupSpansByID groups spans with the same ID returning a map id -> []Span |
| 43 | func (s *spanIDDeduper) groupSpansByID() { |