Skip to content

Support sliding window for summary metrics #205

Closed

Description

@florianmutter

Prom Client should support sliding windows for summaries as described here and here.

This is needed for metrics like request duration where you don't want your request from a week ago influencing the quantiles that are calculated for now.

Activity

  1. siimon commented on Jul 20, 2018

    @siimon
    Contributor

    We are using https://github.com/welch/tdigest for quantiles calculations, not sure if that library has support for setting max ages. If it does it should be trivial to implement, if not then it will be abit more work..

  2. florianmutter commented on Jul 23, 2018

    @florianmutter
    Author

    As far as I can tell they don't have built in support. You would need to implement it in the prom client. Like the Java implementation you would need multiple t-digest buckets which have a given length and where the quantiles are calculated. Here is the official Java-Implementation which does that: https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/Summary.java#L70-L77 and https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/TimeWindowQuantiles.java

  3. Wenzil commented on Aug 30, 2018

    @Wenzil

    Without this feature, the exported quantiles don't really tell a good estimate about the state of the system right now, rendering them rather useless in many scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions