prometheus / client_rust

Prometheus / OpenMetrics client library in Rust
Apache License 2.0
486 stars 80 forks source link

Missing GaugeWithExemplar #122

Open bobrik opened 1 year ago

bobrik commented 1 year ago

I want to have a GaugeWithExemplar that adds an exemplar whenever gauge derivates from zero. The actual use-case is making a flamegraph and putting it into the exemplar label, so that it can be easily found.

It seems like it would mostly be a copy of CounterWithExemplar, so I'm happy to make a PR if this makes sense.

bobrik commented 1 year ago

Apparently there's https://github.com/OpenObservability/OpenMetrics/issues/241.

mxinden commented 1 year ago

Thanks for the input. No opinion here, i.e. not opposed to merging a patch. Just want to be consistent with Prometheus and/or OpenMetrics.