Sonar metrics

PR created on behalf of @borjamarcos , which is pretty busy right now :)