Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing non-deterministic Prometheus metrics e.g. latency? #435

Open
MichaelRybak opened this issue Jun 8, 2020 · 0 comments
Open

Testing non-deterministic Prometheus metrics e.g. latency? #435

MichaelRybak opened this issue Jun 8, 2020 · 0 comments
Assignees
Labels

Comments

@MichaelRybak
Copy link
Contributor

MichaelRybak commented Jun 8, 2020

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?

  • Research existing options
  • Possibly propose new features to Prometheus

https://groups.google.com/g/prometheus-developers/c/do7t-vmktk0

@MichaelRybak MichaelRybak self-assigned this Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant