I don't own a dog, but am an animal lover. A student of mine had a beautiful year and a half year old dog who died suddenly. The vet says it may be due to the food he was given. The food had legumes in it. There are articles linking legumes in a dogs diet to cardio myopathy. Please be careful!
The reason the dogs have issues is because the prepackaged stuff does NOT have enough of what they need. For instance, lot of these types of foods don't have enough required protien in them. Or vitamins. (though you have to be very careful with Vit D with dogs and there was a recent recall on foods for that)
I give my dog lentils because I make her a doggie bologna (mostly chicken livers, chicken hearts, beef heart, beef liver + cranberrys oatmeal) but she's n a mostly raw diet. When I give her lentils, its because I cooked them and added them in with her food. Same with peas.
Her food base is raw. Meaning, raw turkey necks, chicken feet, ground beef, chicken parts, tripe, etc. She also gets oatmeal/whole grains and, other fruits and vegetables. If given in the right amounts you're fine. Leguemes should be less than 20% of the overall diet for dogs.
Plus lets remember Peanut butter is included in this group. I think my dog would shank me if I took away her peanut butter....