예제 #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 collect(self, spanID, *annotations):
        self._log("collecting", str(len(annotations)), "annotations for",
                  str(spanID))

        # Append the collection packet to the pending queue.
        self._pending.append(encode._collect(spanID, *annotations))
예제 #4
0
    def collect(self, spanID, *annotations):
        self._log("collecting", str(len(annotations)), "annotations for", str(spanID))

        # Append the collection packet to the pending queue.
        self._pending.append(encode._collect(spanID, *annotations))