(self, metric)
return {
            "metric": metric.getMetricPath(),
            "value": metric.value,
            "dimensions": dims,
            # We expect ms timestamps
            "timestamp": metric.timestamp * 1000,
        }
Convert diamond metric into something signalfx can understand
Convert diamond metric into something signalfx can understand
Convert diamond metric into something signalfx can understand
def into_signalfx_point(self, metric):
        """
        Convert diamond metric into something signalfx can understand
        """
        dims = {
            "collector": metric.getCollectorPath(),
            "prefix": metric.getPathPrefix(),
        }
        if metric.host is not None and metric.host != "":
            dims["host"] = metric.host

        return {
            "metric": metric.getMetricPath(),
            "value": metric.value,
            "dimensions": dims,
            # We expect ms timestamps
            "timestamp": metric.timestamp * 1000,
        }
def into_signalfx_point ( self , metric ) : dims = { "collector" : metric . getCollectorPath ( ) , "prefix" : metric . getPathPrefix ( ) , } if metric . host is not None and metric . host != "" : dims [ "host" ] = metric . host return { "metric" : metric . getMetricPath ( ) , "value" : metric . value , "dimensions" : dims , # We expect ms timestamps "timestamp" : metric . timestamp * 1000 , }