removed unnecessary code
added type for relay function, added check for no metrics, added metric
type str in log statement.