(self, instance)
return istio_mesh_instance
Grab the istio mesh scraper from the dict and return it if it exists,
        otherwise create the scraper and add it to the dict.
Grab the istio mesh scraper from the dict and return it if it exists,
        otherwise create the scraper and add it to the dict.
Grab the istio mesh scraper from the dict and return it if it exists otherwise create the scraper and add it to the dict .
def _create_istio_mesh_instance(self, instance):
        """
        Grab the istio mesh scraper from the dict and return it if it exists,
        otherwise create the scraper and add it to the dict.
        """
        endpoint = instance.get('istio_mesh_endpoint')

        istio_mesh_instance = deepcopy(instance)
        istio_mesh_instance.update(
            {
                'namespace': MESH_NAMESPACE,
                'prometheus_url': endpoint,
                'label_to_hostname': endpoint,
                'metrics': [MESH_METRICS] + instance.get('metrics', []),
                # Defaults that were set when istio was based on PrometheusCheck
                'send_monotonic_counter': instance.get('send_monotonic_counter', False),
                'health_service_check': instance.get('health_service_check', False),
                # Override flag to submit monotonic_count for Prometheus counter metrics along with gauge.
                # This allows backwards compatibility for the overriding of `send_monotonic_counter`
                # in order to submit correct metric types. Monotonic counter metrics end with `.total` to its gauge
                'send_monotonic_with_gauge': instance.get('send_monotonic_with_gauge', True),
            }
        )

        return istio_mesh_instance
def _create_istio_mesh_instance ( self , instance ) : endpoint = instance . get ( 'istio_mesh_endpoint' ) istio_mesh_instance = deepcopy ( instance ) istio_mesh_instance . update ( { 'namespace' : MESH_NAMESPACE , 'prometheus_url' : endpoint , 'label_to_hostname' : endpoint , 'metrics' : [ MESH_METRICS ] + instance . get ( 'metrics' , [ ] ) , # Defaults that were set when istio was based on PrometheusCheck 'send_monotonic_counter' : instance . get ( 'send_monotonic_counter' , False ) , 'health_service_check' : instance . get ( 'health_service_check' , False ) , # Override flag to submit monotonic_count for Prometheus counter metrics along with gauge. # This allows backwards compatibility for the overriding of `send_monotonic_counter` # in order to submit correct metric types. Monotonic counter metrics end with `.total` to its gauge 'send_monotonic_with_gauge' : instance . get ( 'send_monotonic_with_gauge' , True ) , } ) return istio_mesh_instance