change metrics post json to allow for easier validation
more validation and extra logging