Add debug logging to Sonar metric source.