implemented metrics reporting over http