(self)
For backward compatibility reasons, if a custom query specifies a
        `metric_prefix`, change the submission name to contain it.
For backward compatibility reasons, if a custom query specifies a
        `metric_prefix`, change the submission name to contain it.
For backward compatibility reasons if a custom query specifies a metric_prefix change the submission name to contain it .
def _fix_custom_queries(self):
        """
        For backward compatibility reasons, if a custom query specifies a
        `metric_prefix`, change the submission name to contain it.
        """
        custom_queries = self.instance.get('custom_queries', [])
        global_custom_queries = self.init_config.get('global_custom_queries', [])
        for query in itertools.chain(custom_queries, global_custom_queries):
            prefix = query.get('metric_prefix')
            if prefix and prefix != self.__NAMESPACE__:
                if prefix.startswith(self.__NAMESPACE__ + '.'):
                    prefix = prefix[len(self.__NAMESPACE__) + 1 :]
                for column in query.get('columns', []):
                    if column.get('type') != 'tag':
                        column['name'] = '{}.{}'.format(prefix, column['name'])
def _fix_custom_queries ( self ) : custom_queries = self . instance . get ( 'custom_queries' , [ ] ) global_custom_queries = self . init_config . get ( 'global_custom_queries' , [ ] ) for query in itertools . chain ( custom_queries , global_custom_queries ) : prefix = query . get ( 'metric_prefix' ) if prefix and prefix != self . __NAMESPACE__ : if prefix . startswith ( self . __NAMESPACE__ + '.' ) : prefix = prefix [ len ( self . __NAMESPACE__ ) + 1 : ] for column in query . get ( 'columns' , [ ] ) : if column . get ( 'type' ) != 'tag' : column [ 'name' ] = '{}.{}' . format ( prefix , column [ 'name' ] )