Send message to backend.

def send(self, stat, value, rate=1):
        """Send message to backend."""
        if rate < 1 and random() > rate:
            return

        message = self.build_message(stat, value)
        if not message:
            return

        if self.pipeline is None:
            return self._send(message)

        self.pipeline.append(message)