Пример #1
0
    def collect(self, spanID, *annotations):
        self._log("collecting", str(len(annotations)), "annotations for", str(spanID))
        packet = encode._collect(spanID, *annotations)
        buf = encode._msg(packet)

        totalSent = 0
        while totalSent < len(buf):
            sent = self.sock.send(buf[totalSent:])
            if sent == 0:
                raise RuntimeError("socket connection broken")
            totalSent = totalSent + sent
Пример #2
0
    def collect(self, spanID, *annotations):
        self._log("collecting", str(len(annotations)), "annotations for",
                  str(spanID))
        packet = encode._collect(spanID, *annotations)
        buf = encode._msg(packet)

        totalSent = 0
        while totalSent < len(buf):
            sent = self.sock.send(buf[totalSent:])
            if sent == 0:
                raise RuntimeError("socket connection broken")
            totalSent = totalSent + sent
Пример #3
0
 def writeMsg(self, msg):
     self.transport.write(encode._msg(msg))
Пример #4
0
 def writeMsg(self, msg):
     self.transport.write(encode._msg(msg))