-
Notifications
You must be signed in to change notification settings - Fork 19
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
Prometheus encoding #1525
base: dev
Are you sure you want to change the base?
Prometheus encoding #1525
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of this might already be broken due to the API refactor going on in the api-breakers
branch.
I'd rebase this PR on that branch to make sure it's using the latest return types and endpoints.
alerts/prometheus.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add an integration test to /internal/test/e2e/prometheus.go
which fetches all those metrics and makes sure they are sane. Which just means fetching all the metrics from various endpoints, checking that the name matches our expectations, the labels exist, the value is set to a value that's not 0 and the timestamp is set to something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you want to handle client end of these requests for the test? Should I just do it in ad hoc way and make an HTTP request helper or should there be a Jape client for the Prometheus endpoints?
Continuation of #1068
Addressed some of the concerns in the reviews:
PrometheusMetric
method to original type where possiblewriteResponse
logic to api packagejape