Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promql: Remove extrapolation from rate/increase/delta. #1161

Closed
wants to merge 1 commit into from

Commits on Oct 11, 2015

  1. promql: Remove extrapolation from rate/increase/delta.

    This is an improvement from both a theoretical and practical
    standpoint.
    
    Theory:
    For simplicty I'll take the example of increase().
    
    Counters are fundamentally lossy, if there's a counter reset
    or instance failure between one scrape and the next we'll
    lose information about the period up to the reset/failure.
    Thus the samples we have allow us to calculate a lower-bound
    on the increase() in a time period.
    
    Extrapolation multiples this by an amount depending on timing which is
    an upper bound based on what might have happened if everything continued
    as it was.
    This mix of upper and lower bounds means that we can't make any
    meaningful statements about the output of increase() in relation to what
    actually happened.
    
    By removing the extrapolation, we can once again reason that the result
    of increase() is a lower bound on the true increase of the counter.
    
    Practical:
    Fixes #581.
    The extrapolation presumes that it's looking at a range within a
    continuous stream of samples. If in fact the time series starts or
    end within this range, this leads to an over-correction.
    
    For discrete counters and gauges, extrapolating to invalid values in
    their domain can be confusing and prevent rules being written that
    depend on exact values.
    
    For those looking to graph things more accurately irate() is a better
    choice than extrapolation on rate().
    For those looking to calculate how a gauge is trending deriv() is a
    better choice than delta().
    brian-brazil committed Oct 11, 2015
    Configuration menu
    Copy the full SHA
    06c55d7 View commit details
    Browse the repository at this point in the history