AlexanderThaller / prometheus_exporter

Helper libary to export prometheus metrics using tiny_http and rust-prometheus.
MIT License
28 stars 10 forks source link

Allow taking the update lock without waiting #39

Open robryk opened 1 year ago

robryk commented 1 year ago

wait_request and wait_duration can be used to achieve two results at once:

I would like to do the latter without the former: my metrics are updates based on events, but those events cause updates of multiple metrics. wait_duration with a zero duration would probably do what I want, but it's unintuitive.

AlexanderThaller commented 1 year ago

@robryk Should be easy to implement. Do you have a preference for a name for this new method. Just calling it wait would be ok I think.

AlexanderThaller commented 1 year ago

https://github.com/AlexanderThaller/prometheus_exporter/pull/41 does that work for you? @robryk