Пример #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))