(check, metric_name, modifiers, global_options)
return native
Uses whatever the endpoint describes as the metric type in the first occurrence.
Uses whatever the endpoint describes as the metric type in the first occurrence.
Uses whatever the endpoint describes as the metric type in the first occurrence .
def get_native_transformer(check, metric_name, modifiers, global_options):
    """
    Uses whatever the endpoint describes as the metric type in the first occurrence.
    """
    transformer = None

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

        transformer(metric, sample_data, runtime_data)

    return native
def get_native_transformer ( check , metric_name , modifiers , global_options ) : transformer = None def native ( metric , sample_data , runtime_data ) : nonlocal transformer if transformer is None : transformer = NATIVE_TRANSFORMERS [ metric . type ] ( check , metric_name , modifiers , global_options ) transformer ( metric , sample_data , runtime_data ) return native