async def send(self, metric):
        """Transform metric to JSON bytestring and send to server.

        Args:
            metric (dict): Complete metric to send as JSON.
        """
        message = json.dumps(metric).encode('utf-8')
        await self.loop.create_datagram_endpoint(
            lambda: UDPClientProtocol(message),
            remote_addr=(self.ip, self.port))
Transform metric to JSON bytestring and send to server.

        Args:
            metric (dict): Complete metric to send as JSON.