Re: [prometheus-developers] Exemplars for _count in Summaries

2022-10-18 Thread 'Fabian Stäber' via Prometheus Developers
Side note: In Java this would be particularly useful because the popular
Spring Boot framework exposes a Summary http_server_requests_seconds by
default that look like this (no quantiles, just _count and _sum):

# HELP http_server_requests_seconds
# TYPE http_server_requests_seconds summary
http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/",}
1.0
http_server_requests_seconds_sum{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/",}
1.014687278

I think this is pretty useful, you can get request rates and error rates
out of it. If Prometheus / OpenMetrics had support for Exemplars on the
_count, users could find example traces per HTTP status and URI.

Fabian

On Tue, Oct 18, 2022 at 3:05 PM Bjoern Rabenstein 
wrote:

> On 06.10.22 14:45, 'Fabian Stäber' via Prometheus Developers wrote:
> >
> > Great question from the CNCF Slack: What's the reason why we don't allow
> > Exemplars for _count in Summary metrics?
> >
> > What do you think? Any reason why Exemplars don't work in _count in
> > Summaries? Would that be something we could consider supporting?
>
> The _count of a Summary _and_ the _count of a Histogram (both
> conventional as well as the new native ones) is essentially a counter
> within the larger "structured" metric of a Summary/Histogram.
>
> From that perspective, it should have the option of attaching an
> examplar, as a regular Counter has, too.
>
> My speculation why it doesn't in OpenMetrics:
>
> In an OM Histogram, the +Inf bucket fulfills exactly the same function
> as the _count (spec says: "The +Inf bucket counts all requests.") So
> if you would like an examplar on the _count of a Histogram, you can as
> well use an exemplar on the +Inf bucket.
>
> That obviously doesn't help in the case of a Summary, but I guess the
> rationale is that Histograms are generally to be preferred over
> Summaries, and therefore didn't get the thourough treatment when it
> came to exemplars.
>
>
> However, even if you really dislike the precalculated quantiles in
> Summaries, there is still the case of a Summary without quantiles. I
> think adding exemplars to such a Summary is as much needed as adding
> exemplars to any regular Counter.
>
> --
> Björn Rabenstein
> [PGP-ID] 0x851C3DA17D748D03
> [email] bjo...@rabenste.in
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/CAPX310gkwmHtuSM8oyC6pYRupE6kwCEEC08qWzf4H-C%2Bxj4k1g%40mail.gmail.com.


Re: [prometheus-developers] Exemplars for _count in Summaries

2022-10-18 Thread Bjoern Rabenstein
On 06.10.22 14:45, 'Fabian Stäber' via Prometheus Developers wrote:
> 
> Great question from the CNCF Slack: What's the reason why we don't allow 
> Exemplars for _count in Summary metrics?
> 
> What do you think? Any reason why Exemplars don't work in _count in 
> Summaries? Would that be something we could consider supporting?

The _count of a Summary _and_ the _count of a Histogram (both
conventional as well as the new native ones) is essentially a counter
within the larger "structured" metric of a Summary/Histogram.

>From that perspective, it should have the option of attaching an
examplar, as a regular Counter has, too.

My speculation why it doesn't in OpenMetrics:

In an OM Histogram, the +Inf bucket fulfills exactly the same function
as the _count (spec says: "The +Inf bucket counts all requests.") So
if you would like an examplar on the _count of a Histogram, you can as
well use an exemplar on the +Inf bucket.

That obviously doesn't help in the case of a Summary, but I guess the
rationale is that Histograms are generally to be preferred over
Summaries, and therefore didn't get the thourough treatment when it
came to exemplars.


However, even if you really dislike the precalculated quantiles in
Summaries, there is still the case of a Summary without quantiles. I
think adding exemplars to such a Summary is as much needed as adding
exemplars to any regular Counter.

-- 
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/Y06klFkG1yubFGmE%40mail.rabenste.in.