added a hearbeat to reestablish a connection when analytics rest endpoint goes down