Metrics http fix

@syamp 
tests and docs added