Thanks a lot Bryan.

I think if there is no technical obstacle, we should consider allowing
Exemplars for counts in OpenMetrics.

Example: Counts are often used for error rates like this:

sum(rate(http_server_duration_count{http_status_code=~"5.."}[5m])) /
sum(rate(http_server_duration_count[5m]))

If the counts came with Exemplars, we could build a feature in Grafana to
visualize them on an "error rate" graph, i.e. you could click on an example
of an HTTP 500 error and navigate directly to the corresponding trace, or
to the logs filtered by trace ID.

Fabian


On Sat, Oct 8, 2022 at 2:28 PM Bryan Boreham <bjbore...@gmail.com> wrote:

> I suspect the answer is that the OpenMetrics spec does not mention
> exemplars on Summaries.
>
> https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
>
> I don't see any technical obstacle to attaching them in
> https://github.com/prometheus/client_golang.
> Inside Prometheus, Summaries are just two metrics, so no special handling
> required.
>
> Bryan
>
> On Thursday, 6 October 2022 at 16:45:29 UTC-5 fab...@fstab.de wrote:
>
>> Hi,
>>
>> Great question from the CNCF Slack: What's the reason why we don't allow
>> Exemplars for _count in Summary metrics?
>>
>> Use case: Java's Micrometer provides a Summary with just a _count and a
>> _sum as the default metric for HTTP services. The _count has the HTTP
>> status code as a label, so these metrics are great for request rates and
>> error rates (and for average latencies if you have nothing better).
>>
>> However, there's currently no way to have exemplars. It would be nice to
>> have them, for example for investigating erroneous calls. If the _count was
>> an explicit counter, and not part of a summary, Exemplars would be
>> supported.
>>
>> What do you think? Any reason why Exemplars don't work in _count in
>> Summaries? Would that be something we could consider supporting?
>>
>> Fabian
>>
> --
> 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/34b54e23-51dc-4cfb-b00a-fc36a8d8c1bdn%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-developers/34b54e23-51dc-4cfb-b00a-fc36a8d8c1bdn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAPX310hXJKBT4bv0gwxPCHC0Y8T_W%2Bt2U%3DONWhTJd5%2BKyO_dGQ%40mail.gmail.com.

Reply via email to