-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make prometheus-scrapable #861
Comments
I've looked at incorporating this change with the API changes I am making today but adding it can open a can of worms that I don't want to open yet. There's a decent node library for this, prom-client. It handles storing the metrics as well, which is something I don't want to touch right now. I looked further to see if I could just use the code that generates the output but it's tightly coupled with it's metric registry. We could generate our own text ... but I think the right approach would be to try and fully integrate with the So, I'm punting on this for now. |
Oh, also here's where I got WRT handling the accept header:
|
I take it back, I'll bolt on something simple temporarily. |
This is done and hopefully works with prometheus correctly:
|
As shown above, it looks only for the |
Note that the |
We'd like to be able to have prometheus scrape teraslice. It needs to publish metrics in exposition format [1].
Implementation idea: make existing
/cluster/stats
endpoint switch its output format based onAccept
header likeapplication/openmetrics-text; version=0.0.1,text/plain;version=0.0.4;q=0.5,*/*;q=0.1
[2], defaulting to its current json format. In other words, no need to touch all the points where the metrics are collected.[1] https://prometheus.io/docs/instrumenting/exposition_formats/
[2] https://github.com/prometheus/prometheus/blob/a30348f1a49f76b11efbf5cc2fe1b0bdb06a6cdb/scrape/scrape.go#L454
The text was updated successfully, but these errors were encountered: