cut down on duplicated code
parse PutMetricData