Yes, I've been thru that many times.
If no liver, kidney, spine or costly degenerative health issues, then I go by "Their Spirit".
One of my dogs is old. Found her, so estimating 17-19.
Was going to put her down, but when went to vet, we put her on a monthly steroid shot and 100mg Carprofen daily. (I give her the shot so super easy to go by and get).
She still has "Spirit". Wags her tail (at times), gets all frisky (at times) and still enjoys playing with the other dogs. Sleeps a lot tho.
She does have a non cancerous tumor growth near her stomach.
Vet drains sometimes and said, "Don't worry about it".
She does really well on the meds. (Cost abut $100/month for both).
So I go by their "Spirit" to live, if can afford treatment.
Otherwise, you'll know and recognize "It's time".
One thing to remember, it's much harder on you and your family psychologically than your dog. Death is just a part of life.
Remember the "Good times" and the joy you gave her/him and the enjoyment, fun, crazy things your dog provided to you and your family.
And yes, only dog (animal) lovers understand they're a part of your family.
Hoping for the best and wishing you & your "Best loyal & lovable friend" well, Scruffer