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

Add non-cumulative distribution type #4863

Closed
mml opened this Issue Nov 13, 2018 · 5 comments

Comments

Projects
None yet
6 participants
@mml
Copy link

mml commented Nov 13, 2018

Proposal

Sometimes it's valuable to report a distribution that's not cumulative. Typical cumulative distributions aggregate approximately all observations since start time, and provide ways for us to examine rates and deltas to figure out things like QPS or "99th percentile latency in the last 30m".

Non-cumulative distribution types are like gauges. Example usages/observations: heap characteristics in a malloc implementation (i.e. "what are the counts and sizes of free objects"), or for a work queue, the amount of time each item has been in the queue.

@cheftako

This comment has been minimized.

Copy link

cheftako commented Nov 13, 2018

+1

1 similar comment
@logicalhan

This comment has been minimized.

Copy link

logicalhan commented Nov 13, 2018

+1

@lavalamp

This comment has been minimized.

Copy link

lavalamp commented Nov 13, 2018

Additional color: you can almost do this with the existing summary in two different ways:

  1. Use the MaxAge feature
  2. Use a vector, with a fresh index each time (deleting the prior one)

Unfortunately neither of these (afaict) allow for concurrency guarantees around making observations, so the monitoring software could well take a reading while you're halfway through adding observations.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Nov 14, 2018

PromQL already supports this via the histogram function. You will need to write a custom collector to expose data for this (which you'd need to do anyway). OpenMetrics has a GaugeHistogram type, which you can already use in custom collectors in client_python.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Feb 4, 2019

Closing this as this is not an issue about the Prometheus server, but about how to expose this via client libraries (which is already possible).

@juliusv juliusv closed this Feb 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.