Please note: Information in this post is not meant as a substitute for veterinary care. Always consult your veterinarian in an emergency.
First and Foremost, do not put yourself between a per and a swarm of bees or wasps. If the swarm is still present, have a trained personnel wearing full safety gear, rescue your dog.
Throw a blanket over your dog and transport to the vet ASAP! Call the vet on your way to see if there is anything you can do while on your way.