Add pool stats to /metrics admin endpoint#2129
Add pool stats to /metrics admin endpoint#2129steve-chavez wants to merge 2 commits intoPostgREST:mainfrom
/metrics admin endpoint#2129Conversation
|
Before inventing our own metrics output format, I guess it would be better to use something that is already in-use. Note: I have no idea about those formats - so you might already be doing so? I'm sure you have #1526 on your radar, i.e. Prometheus-style metrics. Are there any other "standard" formats for metrics out there? If not, we might as well do Prometheus-style if no other suggestion comes up. And when we do that - I wonder whether https://github.com/fimad/prometheus-haskell can be of any help? |
|
So it looks like prometheus uses a text-based format: There's also OpenMetrics which builds on the prometheus format and tries to standardize it. I briefly thought about whether we could provide different output depending on an I'd assume it sends a But I guess it would make more sense to evaluate the |
|
I recall trying to use |
As mentioned on #2042 (comment), this adds a
/metricsendpoint on the admin server.For now, it contains the database pool stats:
New metrics would be namespaced on their own json field.
With the addition of avanov/pool#3 we'd also get the waiters in the queue (discussed on #2042 (comment))