method for sending metrics