(self)
Execute a scrape, and for each metric collected, transform the metric.
Execute a scrape, and for each metric collected, transform the metric.
Execute a scrape and for each metric collected transform the metric .
def scrape(self):
        """
        Execute a scrape, and for each metric collected, transform the metric.
        """
        runtime_data = {'flush_first_value': self.flush_first_value, 'static_tags': self.static_tags}

        for metric in self.consume_metrics(runtime_data):
            transformer = self.metric_transformer.get(metric)
            if transformer is None:
                continue

            transformer(metric, self.generate_sample_data(metric), runtime_data)

        self.flush_first_value = True
def scrape ( self ) : runtime_data = { 'flush_first_value' : self . flush_first_value , 'static_tags' : self . static_tags } for metric in self . consume_metrics ( runtime_data ) : transformer = self . metric_transformer . get ( metric ) if transformer is None : continue transformer ( metric , self . generate_sample_data ( metric ) , runtime_data ) self . flush_first_value = True