-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Issue starting worker with PrometheusMiddleware #173
Comments
@s3rius thanks for the fix, I was debugging the middleware a bit today and I noticed that the I read the prometheus client documentation's section on multiprocessing and I noticed a couple of things. I implemented some changes which made the metrics start working with two workers. I still see the issue with one worker, not sure what that's about 🤷♂️ I opened #176 with my changes. Please take a look and let me know what you think! Again, I am not much of a python dev so lmk if anything looks off. Thanks again for the great work here, I learned a lot reading this codebase. |
@nickdichev-firework Did you update you taskiq? |
Yesterday I made changes. Today I published a new release. Please try version https://github.com/taskiq-python/taskiq/releases/tag/0.8.3. The problem with registries is that it shows only taskiq's metrics. If user wants to add new metrics, they won't be shown by taskiq. |
@s3rius yes I still get the error on 0.8.3 -- the only way I've been able to resolve the |
Hi, thanks for the awesome library. I am trying to add the
PrometheusMiddleware
to an application, however, I am seeing some strange behavior when starting the worker(s).taskiq
version: 0.8.2 (although I observed the same behavior on 0.8.1)prometheus-client
version: 0.17.1 (although I observed the same behavior on 0.16.0)I have defined my (redis) broker as follows:
When I attempt to start my worker with default worker count I see the following trace (debug log enabled):
pipenv run taskiq worker --fs-discover --workers 2 --log-level DEBUG src.nebula.broker:broker
https://gist.github.com/nickdichev-firework/5b420be1d014f8fe925dcb63b771f5bd
When I attempt to start the worker with only one worker I see the following trace (debug log enabled):
pipenv run taskiq worker --fs-discover --workers 1 --log-level DEBUG src.nebula.broker:broker
https://gist.github.com/nickdichev-firework/36adf01a3ba11e22bf2c17766f61282b
When I remove the
.with_middlewares
call with the broker I am able to start the worker (and process tasks) with two workers. However, what is interesting is that when I reduce it to one worker I see the same output as one worker with prometheus middleware enabled:FileNotFoundError
Any ideas? I am relatively new to python so kind of scratching my head at what else could be useful to debug, please let me know if you need any additional info! Thanks in advance!
The text was updated successfully, but these errors were encountered: