If in doubt, always call your vet or the Animal Poison Line immediately.
Onions contain N-propyl disulphide which damages red blood cells, leading to haemolytic anaemia. All forms are dangerous : cooked onions, onion powder, and onion-containing sauces are just as toxic as raw. Toxicity is cumulative, meaning small amounts over time can cause serious harm.
Contact your vet. Effects can develop days after eating. If you know your dog ate onions recently, call your vet even without symptoms.