On 06 Dec 23:06, 'Fabian Stäber' via Prometheus Developers wrote:
> Hi,
>
> I'm experimenting with Exemplars for Gauge metrics in client_java
> (background: at the dev summit on 10 November 2022
> <
https://docs.google.com/document/d/11LC3wJcVk00l8w5P3oLQ-m3Y37iom6INAMEu2ZAGIIE/edit>
> we decided that "Prometheus will ingest Exemplars on all time series").
>
> For comparison: A counter MUST have the following methods
> <
https://prometheus.io/docs/instrumenting/writing_clientlibs/#counter>:
>
> - inc(): Increment the counter by 1
> - inc(double v): Increment the counter by the given amount. MUST check
> that v >= 0.
>
> Exemplars will contain the increment, i.e. if inc() is called the Exemplar
> will have the value 1.0, if inc(v) is called the Exemplar will have the
> value v.
>
> Now, A gauge MUST have the following methods
> <
https://prometheus.io/docs/instrumenting/writing_clientlibs/#gauge>:
>
> - inc(): Increment the gauge by 1
> - inc(double v): Increment the gauge by the given amount
> - dec(): Decrement the gauge by 1
> - dec(double v): Decrement the gauge by the given amount
> - set(double v): Set the gauge to the given value
>
> Which value should we choose for Gauge Exemplars?
That is a good question and my guess would be that it will depend on the
use case. Do you have examples of gauges would would attach exemplars
to?
--
Julien Pivotto
@roidelapluie