The health of its immune system in general seems to be a major factor. Dogs are at far more risk when they are already stressed by disease. The reported incidence of autoimmune disease is on the rise, and there is some debate as to whether this is because it is really more common or because we are better at detecting it. I believe that both factors are probably involved. A couple of recent papers suggest that both an increase in pollution and an increase in sanitation could be problematic.
Levels tend to be higher in rural areas where wells are the water source.
Most commonly found are carbamate insecticides and triazine herbicides. For the last five years a group in Wisconsin have fed cocktails of these contaminants as they are typically found in tap water to male mice via their drinking water. They report a measurable effect on nervous, immune and endocrine systems. These results were found if the mice received mixtures but not individual chemicals at these low levels. A study of 4 and 5 year old, lowland living children in Mexico exposed to pesticides compared to a highland group living where there is no pesticide use found increased aggression, reduced stamina and impaired cognitive ability in the former group - all symptoms of hypothyroidism although thyroid levels were not measured in these groups.