-
Notifications
You must be signed in to change notification settings - Fork 21
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
hypercorn with several workers #89
Comments
I think I understand the problem you are trying to solve. The aioprometheus package does not support using it like how you point out the official prometheus client library (which I think looks pretty complicated) accommodates this problem. I've simply exposed the metrics from each worker when I've run a FastAPI server with uvicorn (similar to what you are doing with Quart and Hypercorn). Like you noticed, they each have their own state. |
But doesn't it make the metrics unstable because so another worker keeps responding? |
Any news on this? I agree with @L1F. State should be unique across all workers, since the scraping will hit once to collect all metrics in a consolidate way. |
Also waiting for an update on this. Not sure if you found a way @L1F |
I would like to start my quart application with several workers, but this is not so easy in connection with aioprometheus, because each worker has its own state.
In the official prometheus client library this can be solved like this: https://github.com/prometheus/client_python#multiprocess-mode-eg-gunicorn
How can I solve this?
The text was updated successfully, but these errors were encountered: