(self, runtime_data)
Yield the processed metrics and filter out excluded metrics.
Yield the processed metrics and filter out excluded metrics.
Yield the processed metrics and filter out excluded metrics .
def consume_metrics(self, runtime_data):
        """
        Yield the processed metrics and filter out excluded metrics.
        """

        metric_parser = self.parse_metrics()
        if not self.flush_first_value and self.use_process_start_time:
            metric_parser = first_scrape_handler(metric_parser, runtime_data, datadog_agent.get_process_start_time())
        if self.label_aggregator.configured:
            metric_parser = self.label_aggregator(metric_parser)

        for metric in metric_parser:
            if metric.name in self.exclude_metrics or (
                self.exclude_metrics_pattern is not None and self.exclude_metrics_pattern.search(metric.name)
            ):
                self.submit_telemetry_number_of_ignored_metric_samples(metric)
                continue

            yield metric
def consume_metrics ( self , runtime_data ) : metric_parser = self . parse_metrics ( ) if not self . flush_first_value and self . use_process_start_time : metric_parser = first_scrape_handler ( metric_parser , runtime_data , datadog_agent . get_process_start_time ( ) ) if self . label_aggregator . configured : metric_parser = self . label_aggregator ( metric_parser ) for metric in metric_parser : if metric . name in self . exclude_metrics or ( self . exclude_metrics_pattern is not None and self . exclude_metrics_pattern . search ( metric . name ) ) : self . submit_telemetry_number_of_ignored_metric_samples ( metric ) continue yield metric