code: func (t *tx) End() error {
  	t.mtx.Lock()
  	defer t.mtx.Unlock()
  
  	for t.ss.Peek() != rootSegment {
  		t.EndSegment() // discarding errors?
  	}
  	return t.Tracer.EndTransaction(t.id)
  }
docs: // End ends a transaction.