Spaying your dog before her first heat means that you have nearly a 100% chance of her never getting mammary cancer. I spayed my now 12 year old dog when she was 4 months old, but today, I would do it at 6 months old because 4 months was a little early. My current vet spays/neuters animals at about 6 months of age. I would never wait until my dog had a heat - there is zero health benefit that has any conclusive evidence. But, there is a proven and known health benefit to spaying your dog early to reduce greatly the mammary cancer risk. Anesthesia these days is very safe - ask your vet what kind he/she uses. Mine uses isoflourane gas which is safe and my high risk dog has been down for surgery a couple of times and does fine. Here is some info for you
ASPCA | Spay-Neuter