Sending multiple metrics in one connection

This PR allows to send several custom metrics in a batch.