> Is there a chance that we can standardize this in the OpenMetrics specs

I recommend taking that question to an OpenMetrics list.  Whilst there is 
overlap between the Prometheus developers and OpenMetrics, no decision 
could be reached here.

(Prometheus could independently decide to go beyond what OpenMetrics says)

> Also, what do you think about supporting _count in Histograms (since 
Histogram extends Summary with buckets)?

Maybe your point is that exemplars are tied to the _bucket metrics and not 
the _count metric?
How exactly would you change this while remaining backwards-compatible for 
existing users?

Perhaps the upcoming "native histograms" or "sparse histograms" feature 
will suit what you need?

Bryan

On Tuesday, 11 October 2022 at 23:47:03 UTC-4 [email protected] wrote:

> Hi,
>
> Thank you for the answer. Is there a chance that we can standardize this 
> in the OpenMetrics specs so that it is well defined and documented? This 
> can help to avoid confusion and clearly state what is supported and what is 
> not. Also, since Counter already can have an Exemplar and semantically 
> _count is a Counter, everything should be available in the specs, this is 
> mostly about "wiring" them together.
>
> Also, what do you think about supporting _count in Histograms (since 
> Histogram extends Summary with buckets)?
>
> Thanks,
> Jonatan
>
> On Saturday, October 8, 2022 at 5:36:27 AM UTC-7 [email protected] wrote:
>
>> 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 <[email protected]> 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 [email protected] 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 [email protected].
>>> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/c31c4ab9-e395-4f92-a696-000125f736a2n%40googlegroups.com.

Reply via email to