-
Notifications
You must be signed in to change notification settings - Fork 36
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
Support multiple histogram output formats #325
Comments
Hey @theute + @pilhuhn , so I'd start with timers only for now and implement this in a way that SmallRye will have a
Our SmallRye-specific If this proves useful, it will be backported to MP Metrics spec later. Do you have any other ideas? |
Do you have a code example ? That would speak to me better. |
It would look like this - for annotated metrics you will use
for programmatic approach without annotations, you will use
the timer registered this way would be exported the way you requested, with the defined buckets. There will also be some sort of default for the buckets, so you don't have to specify them. |
Perhaps |
Maybe BY_BUCKETS or PER_BUCKET ? Also for buckets it should count all request lower or equals to the threshold, and I suggest to use the name "le" like in other solutions ( https://prometheus.io/docs/practices/histograms/ ) So for buckets of 1, 2, 3 and for a time of 2 this should have |
I may have asked the wrong thing actually... In the end it would be handy to also have the HTTP service path and HTTP method (and buckets) like in the upper example used in Python... Maybe we should just implement a JAX-RS filter... @pilhuhn thoughts ? |
This is a very important feature. Having the histogram data available in Prometheus gives a lot of flexibility when querying and aggregating the data. The same doesn't happen when the percentiles are calculated in the client. |
@jmartisk Is there any plan to include this feature in the next release of SmallRye? I need to decide between temporarily use the existing percentiles calculated on the client or wait until it gets released. Thanks. |
If there's really demand for something like what I described in comments #325 (comment) and #325 (comment) then I am willing to do that, I think it is realistic that it could get into SR Metrics 3.0 (but I can't promise 100 %). However, PRs with contributions are welcome too ;) |
I don't think there are types of histogram. There are output formats: precalculated percentiles (Prometheus calls it Summary) or the raw histogram data (the values in each bucket). Just an idea: a new attribute called |
Allow switching histogram output from showing percentiles to showing item counts within defined buckets. For example, a timer will export something like this
Originally reported in MP Metrics as microprofile/microprofile-metrics#587
The text was updated successfully, but these errors were encountered: