(self, metric_name, val, sample, scraper_config, hostname=None)
return self._finalize_tags_to_submit(
            _tags, metric_name, val, sample, custom_tags=custom_tags, hostname=hostname
        )
Redefine this method to allow labels duplication, during migration phase
Redefine this method to allow labels duplication, during migration phase
Redefine this method to allow labels duplication during migration phase
def _metric_tags(self, metric_name, val, sample, scraper_config, hostname=None):
        """
        Redefine this method to allow labels duplication, during migration phase
        """
        custom_tags = scraper_config['custom_tags']
        _tags = list(custom_tags)
        _tags += scraper_config['_metric_tags']
        for label_name, label_value in iteritems(sample[self.SAMPLE_LABELS]):
            if label_name not in scraper_config['exclude_labels']:
                _tags += self._build_tags(label_name, label_value, scraper_config)
        return self._finalize_tags_to_submit(
            _tags, metric_name, val, sample, custom_tags=custom_tags, hostname=hostname
        )
def _metric_tags ( self , metric_name , val , sample , scraper_config , hostname = None ) : custom_tags = scraper_config [ 'custom_tags' ] _tags = list ( custom_tags ) _tags += scraper_config [ '_metric_tags' ] for label_name , label_value in iteritems ( sample [ self . SAMPLE_LABELS ] ) : if label_name not in scraper_config [ 'exclude_labels' ] : _tags += self . _build_tags ( label_name , label_value , scraper_config ) return self . _finalize_tags_to_submit ( _tags , metric_name , val , sample , custom_tags = custom_tags , hostname = hostname )