J.D.
I have had dogs all my life and have had to put down two that were my children before I had a baby. My promise to myself and my animals is quality of life for the animal. Animals are not cheap to own and it is the responsibility of an owner to know this when obtaining this new family member.
If you are asking because of the financial burden, then maybe you need to find the animal a new family. If you are asking for the betterment of the dog, then my way of looking at it was the day my beagle boy wouldn't take a cookie then he was ready to go. Otherwise, if they have mostly good days and the tail wags, it's not time. They are still happy to be alive.
You are that dog's parent and you have to determine what is best for your 4 legged baby boy.
GL!