Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a histogram_quantiles function #1547
Comments
grobie
added
the
feature-request
label
Apr 12, 2016
grobie
changed the title
[Feature Request] Add a histogram_quantiles function
Add a histogram_quantiles function
Apr 12, 2016
This comment has been minimized.
This comment has been minimized.
|
I'm still open to add variadic arguments. This in itself won't be usable since |
This comment has been minimized.
This comment has been minimized.
|
This function would generate one timeseries with a label |
This comment has been minimized.
This comment has been minimized.
|
We could go even further and default to `0.5,0.9,0.99` to match summaries.
|
This comment has been minimized.
This comment has been minimized.
|
I'm not sure about this. Duplication in rules files isn't an argument, as that can be handled by configuration management. It'd also be the first function to return multiple results, which seems a bit messy to me. |
This comment has been minimized.
This comment has been minimized.
|
I had the discussion about |
This comment has been minimized.
This comment has been minimized.
|
Indeed. I Find the Similar to @brian-brazil , I don't really have a problem with duplication in rules. We have that anyway, and deliberately. I can see the argument of saving computational resources, but I'd only take that as a last resort. We had problems with rule evaluation times in the past (especially when it came to histograms), but with 0.18, that's pretty much solved (and further improvements are still possible with time-based indices). As a more general note, I believe many users calculate quantiles in situations where they really want something like "percent of queries served within 100ms" (or an Apdex score, which is very similar). Those numbers are way more natural to calculate with Prometheus, and often more meaningful. I assume that the love for quantiles comes from a history where quantiles were more natural to compute than an Apdex score. Rather than making it easy to mass-calculate quantiles, I'd first like to encourage people to think if they really want a quantile. |
This comment has been minimized.
This comment has been minimized.
|
You're right. I got so used to our quantile labels that it never occurred to me that they violate our label guideline. |
grobie
closed this
Apr 12, 2016
This comment has been minimized.
This comment has been minimized.
|
@beorn7 by now I agree that it's better off in the name. Since client_golang will experience breaking changes, would it make sense to switch summaries from the label to the I realize that's quite invasive. But most other clients don't even have client-side percentiles so it wouldn't cause too much friction across languages. |
This comment has been minimized.
This comment has been minimized.
Colons should only really be added when aggregating, as we don't know the relevant aggregation levels down in instrumentation. |
This comment has been minimized.
This comment has been minimized.
|
The quantile labels are everywhere. They are essentially the way we flatten the complex "summary" metric type into individual time series:
So we needed to change many places. The "proper" solution would be to make complex metric types like "summary" and "histogram" first class citizens (and make the flattening into elementary time series an internal implementation detail). |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
grobie commentedApr 12, 2016
We often calculate 3 quantiles for our metrics, 0.5, 0.9 and 0.99. Instead of having to duplicate definitions and metric evaluations, it'd be beneficial to have a variadic function to calculate all at once. That would save operations in rule evaluations.
histgram_quantiles(<vector>, ...<quantile>)