track both metrics and errors