Added improved metrics recording