You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: I'm unit-testing Prometheus metrics: server's requests count and latencies. The server is written in Go. Latencies are non-determinstic and there seems to be no good way to fake clock in Prometheus or Go. Does Prometheus provide a method similar to CollectAndCompare that lets validating a value (e.g. latency) against a range, not exact expectation? If not, would it be a good feature to add to Prometheus? Alternatively, is there a way to fake clock in Prometheus, so e.g. InstrumentHandlerDuration would propagate the pre-defined fake duration? Or, is there a good way to fake clock in Go?
TL;DR: I'm unit-testing Prometheus metrics: server's requests count and latencies. The server is written in Go. Latencies are non-determinstic and there seems to be no good way to fake clock in Prometheus or Go. Does Prometheus provide a method similar to CollectAndCompare that lets validating a value (e.g. latency) against a range, not exact expectation? If not, would it be a good feature to add to Prometheus? Alternatively, is there a way to fake clock in Prometheus, so e.g. InstrumentHandlerDuration would propagate the pre-defined fake duration? Or, is there a good way to fake clock in Go?
https://groups.google.com/g/prometheus-developers/c/do7t-vmktk0
The text was updated successfully, but these errors were encountered: