redo the metrics class to use a event loop and channels