Stubby officially entered service February 5, 1918, and fought in the French trenches for 18 months, presumably because the Army's recruiting quota was desperately behind schedule. He was one of the many war dog of WWI, which were used to keep morale up in the trenches by being adorable.
"You know what this war needs?"
"Ooh a puppy!"
"A puppy! Yes, I was just gonna say."
Not content with merely joining the Army and surviving a World War, Stubby the dog also managed to become a bonafide hero. You see, "Sergeant" wasn't just some cutesy name he was given, oh no. He actually earned that rank, meaning a cadre of superior officers decided he was eligible for promotion over other qualified, battle-hardened human beings. Why?
One, he was able to warn his unit of incoming artillery attacks thanks to his dog-hearing, and after being hit by a chlorine attack he became very sensitive to the smell of gas. So much so that he could accurately detect it in the air before it hit lethal dosage, barking like a maniac until the soldiers put their masks on.
Stubby also managed to save many people from "no-mans land," the open stretches of land between trenches, by listening for people shouting in English and then either leading medics to the wounded or guiding the wounded back to their trench. If they were speaking German he would presumably stab them with a bayonet he had clenched in his jaws.
All he asks for in return is your support. And snausages.