(check, metric_name, modifiers, global_options)
return native_dynamic
Uses whatever the endpoint describes as the metric type.
Uses whatever the endpoint describes as the metric type.
Uses whatever the endpoint describes as the metric type .
def get_native_dynamic_transformer(check, metric_name, modifiers, global_options):
    """
    Uses whatever the endpoint describes as the metric type.
    """
    cached_transformers = {}

    def native_dynamic(metric, sample_data, runtime_data):
        transformer = cached_transformers.get(metric.type)
        if transformer is None:
            transformer = NATIVE_TRANSFORMERS[metric.type](check, metric_name, modifiers, global_options)
            cached_transformers[metric.type] = transformer

        transformer(metric, sample_data, runtime_data)

    return native_dynamic
def get_native_dynamic_transformer ( check , metric_name , modifiers , global_options ) : cached_transformers = { } def native_dynamic ( metric , sample_data , runtime_data ) : transformer = cached_transformers . get ( metric . type ) if transformer is None : transformer = NATIVE_TRANSFORMERS [ metric . type ] ( check , metric_name , modifiers , global_options ) cached_transformers [ metric . type ] = transformer transformer ( metric , sample_data , runtime_data ) return native_dynamic