(self)
Take metrics from queue and send it to Datadog API
Take metrics from queue and send it to Datadog API
Take metrics from queue and send it to Datadog API
def _send(self):
        """
        Take metrics from queue and send it to Datadog API
        """

        while len(self.queue) > 0:
            metric = self.queue.popleft()

            path = '%s.%s.%s' % (
                metric.getPathPrefix(),
                metric.getCollectorPath(),
                metric.getMetricPath()
            )

            topic, value, timestamp = str(metric).split()
            logging.debug(
                "Sending.. topic[%s], value[%s], timestamp[%s]",
                path,
                value,
                timestamp
            )

            self.api.metric(path, (timestamp, value), host=metric.host)
def _send ( self ) : while len ( self . queue ) > 0 : metric = self . queue . popleft ( ) path = '%s.%s.%s' % ( metric . getPathPrefix ( ) , metric . getCollectorPath ( ) , metric . getMetricPath ( ) ) topic , value , timestamp = str ( metric ) . split ( ) logging . debug ( "Sending.. topic[%s], value[%s], timestamp[%s]" , path , value , timestamp ) self . api . metric ( path , ( timestamp , value ) , host = metric . host )