(self, instance)
return process_galley_instance
Grab the galley scraper from the dict and return it if it exists,
        otherwise create the scraper and add it to the dict.
Grab the galley scraper from the dict and return it if it exists,
        otherwise create the scraper and add it to the dict.
Grab the galley scraper from the dict and return it if it exists otherwise create the scraper and add it to the dict .
def _create_process_galley_instance(self, instance):
        """
        Grab the galley scraper from the dict and return it if it exists,
        otherwise create the scraper and add it to the dict.
        """
        endpoint = instance.get('galley_endpoint')

        process_galley_instance = deepcopy(instance)
        GALLEY_METRICS.update(GENERIC_METRICS)
        process_galley_instance.update(
            {
                'namespace': GALLEY_NAMESPACE,
                'prometheus_url': endpoint,
                'metrics': [GALLEY_METRICS] + instance.get('metrics', []),
                # The following metrics have been blakclisted due to high cardinality of tags
                'ignore_metrics': ['galley_mcp_source_message_size_bytes', 'galley_mcp_source_request_acks_total'],
            }
        )
        process_galley_instance['ignore_metrics'].extend(instance.get('ignore_metrics', []))
        return process_galley_instance
def _create_process_galley_instance ( self , instance ) : endpoint = instance . get ( 'galley_endpoint' ) process_galley_instance = deepcopy ( instance ) GALLEY_METRICS . update ( GENERIC_METRICS ) process_galley_instance . update ( { 'namespace' : GALLEY_NAMESPACE , 'prometheus_url' : endpoint , 'metrics' : [ GALLEY_METRICS ] + instance . get ( 'metrics' , [ ] ) , # The following metrics have been blakclisted due to high cardinality of tags 'ignore_metrics' : [ 'galley_mcp_source_message_size_bytes' , 'galley_mcp_source_request_acks_total' ] , } ) process_galley_instance [ 'ignore_metrics' ] . extend ( instance . get ( 'ignore_metrics' , [ ] ) ) return process_galley_instance