Any app that can track your location in the background should work, especially if your phone has SensorCore. I prefer using NaviComputer - it's free and you can backup/upload your map track to your OneDrive account so you can view or share it later. You can even export the track data and view it animated in Google Earth. It works even if your phone doesn't have SensorCore... as long as it is allowed to run in the background.
Note, though, that apps like this (with high-resolution and high-interval location tracking) will make your phone consume more power. Make sure that your phone is fully-charged before walking your dog. If you intend to walk your dog for more than two hours, you may need to bring a power bank with you.