Jhbate/metrics

@kentquirk refactored integration tests and added individual tests the check the metrics are called and the token it used