prometheus_exporter
prometheus_exporter copied to clipboard
Allow taking the update lock without waiting
wait_request and wait_duration can be used to achieve two results at once:
- on demand/periodic metric generation,
- synchronization of metric updates, so that we never publish a set of metrics whose values do not agree with each other.
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.
@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.
https://github.com/AlexanderThaller/prometheus_exporter/pull/41 does that work for you? @robryk