(self)
Get the line streamer and yield processed metrics.
Get the line streamer and yield processed metrics.
Get the line streamer and yield processed metrics .
def parse_metrics(self):
        """
        Get the line streamer and yield processed metrics.
        """

        line_streamer = self.stream_connection_lines()
        if self.raw_line_filter is not None:
            line_streamer = self.filter_connection_lines(line_streamer)

        for metric in self.parse_metric_families(line_streamer):
            self.submit_telemetry_number_of_total_metric_samples(metric)

            # It is critical that the prefix is removed immediately so that
            # all other configuration may reference the trimmed metric name
            if self.raw_metric_prefix and metric.name.startswith(self.raw_metric_prefix):
                metric.name = metric.name[len(self.raw_metric_prefix) :]

            yield metric
def parse_metrics ( self ) : line_streamer = self . stream_connection_lines ( ) if self . raw_line_filter is not None : line_streamer = self . filter_connection_lines ( line_streamer ) for metric in self . parse_metric_families ( line_streamer ) : self . submit_telemetry_number_of_total_metric_samples ( metric ) # It is critical that the prefix is removed immediately so that # all other configuration may reference the trimmed metric name if self . raw_metric_prefix and metric . name . startswith ( self . raw_metric_prefix ) : metric . name = metric . name [ len ( self . raw_metric_prefix ) : ] yield metric