(
    api_token,
    metric,
    start_time,
    end_time,
    rollup="average",
    extrapolation="null",
    max_extrapolations=0,
    filters=None,
    resolution=60,
    aggregation=Aggregation("sum"),
)
return execute_sfx_program(
        api_token,
        program,
        start_time,
        end_time,
        resolution=resolution,
        dimensions=(aggregation.by if aggregation else []),
    )
Run the simplest of all SignalFX queries: specify a metric name to query and (optionally) some filters, and sum
    the results into a single timeseries.

    :param api_token: a valid SFX API query token (you can get this from the SignalFX dashboard)
    :param metric: name of the metric to query
    :param start_time: beginning of program execution range, as an Arrow object
    :param end_time: end of program execution range, as an Arrow object
    :param rollup: a valid SignalFX rollup string, or None for the default
    :param extrapolation: one of 'null', 'zero', or 'last_value'
    :param max_extrapolations: how many times to apply the extrapolation policy
    :param filters: a list of (filter_name, filter_value) tuples
    :param resolution: smallest time interval (in seconds) to evaluate the program on
        note: SignalFX has a maximum resolution of 1 minute, and only for the most recent data;
              setting a resolution higher than this (or even 1 minute for older data) will be ignored
    :param aggregation: an Aggregation object describing how to group the results
    :returns: a list of (timestamp, value) tuples
Run the simplest of all SignalFX queries: specify a metric name to query and (optionally) some filters, and sum
    the results into a single timeseries.
Run the simplest of all SignalFX queries : specify a metric name to query and ( optionally ) some filters and sum the results into a single timeseries .
def basic_sfx_query(
    api_token,
    metric,
    start_time,
    end_time,
    rollup="average",
    extrapolation="null",
    max_extrapolations=0,
    filters=None,
    resolution=60,
    aggregation=Aggregation("sum"),
):
    """ Run the simplest of all SignalFX queries: specify a metric name to query and (optionally) some filters, and sum
    the results into a single timeseries.

    :param api_token: a valid SFX API query token (you can get this from the SignalFX dashboard)
    :param metric: name of the metric to query
    :param start_time: beginning of program execution range, as an Arrow object
    :param end_time: end of program execution range, as an Arrow object
    :param rollup: a valid SignalFX rollup string, or None for the default
    :param extrapolation: one of 'null', 'zero', or 'last_value'
    :param max_extrapolations: how many times to apply the extrapolation policy
    :param filters: a list of (filter_name, filter_value) tuples
    :param resolution: smallest time interval (in seconds) to evaluate the program on
        note: SignalFX has a maximum resolution of 1 minute, and only for the most recent data;
              setting a resolution higher than this (or even 1 minute for older data) will be ignored
    :param aggregation: an Aggregation object describing how to group the results
    :returns: a list of (timestamp, value) tuples
    """
    rollup = f'"{rollup}"' if rollup else "None"
    agg_string = f".{aggregation}" if aggregation else ""
    program = TS_QUERY_PROGRAM_TEMPLATE.format(
        metric=metric,
        filters=_make_filter_string(filters),
        rollup=rollup,
        extrapolation=extrapolation,
        max_extrapolations=max_extrapolations,
        aggregation=agg_string,
    )
    return execute_sfx_program(
        api_token,
        program,
        start_time,
        end_time,
        resolution=resolution,
        dimensions=(aggregation.by if aggregation else []),
    )
def basic_sfx_query ( api_token , metric , start_time , end_time , rollup = "average" , extrapolation = "null" , max_extrapolations = 0 , filters = None , resolution = 60 , aggregation = Aggregation ( "sum" ) , ) : rollup = f'"{rollup}"' if rollup else "None" agg_string = f".{aggregation}" if aggregation else "" program = TS_QUERY_PROGRAM_TEMPLATE . format ( metric = metric , filters = _make_filter_string ( filters ) , rollup = rollup , extrapolation = extrapolation , max_extrapolations = max_extrapolations , aggregation = agg_string , ) return execute_sfx_program ( api_token , program , start_time , end_time , resolution = resolution , dimensions = ( aggregation . by if aggregation else [ ] ) , )