()
| 135 | } |
| 136 | |
| 137 | func (c *Combiner) sizeError() error { |
| 138 | if c.result == nil || c.maxSizeBytes <= 0 { |
| 139 | return nil |
| 140 | } |
| 141 | |
| 142 | if c.result.Size() > c.maxSizeBytes { |
| 143 | c.maxTraceSizeReached = true |
| 144 | return fmt.Errorf("%w (max bytes: %d)", ErrTraceTooLarge, c.maxSizeBytes) |
| 145 | } |
| 146 | |
| 147 | return nil |
| 148 | } |
| 149 | |
| 150 | // Result returns the final trace and span count. |
| 151 | func (c *Combiner) Result() (*tempopb.Trace, int) { |