Result returns the final trace, its span count, and a bool indicating whether the trace is a connected graph.
()
| 130 | |
| 131 | // Result returns the final trace, its span count, and a bool indicating whether the trace is a connected graph. |
| 132 | func (c *Combiner) Result() (*Trace, int, bool) { |
| 133 | spanCount := -1 |
| 134 | |
| 135 | connected := true |
| 136 | if c.result != nil && c.combined { |
| 137 | // Only if anything combined |
| 138 | SortTrace(c.result) |
| 139 | c.result, connected = finalizeTrace(c.result) |
| 140 | spanCount = len(c.spans) |
| 141 | } |
| 142 | |
| 143 | return c.result, spanCount, connected |
| 144 | } |
| 145 | |
| 146 | // SortTrace sorts a parquet *Trace |
| 147 | func SortTrace(t *Trace) { |