use debugging for metrics logging