Adding metric collection support.