Fixed prometheus multiprocessing registry#620
Fixed prometheus multiprocessing registry#620FadingFog wants to merge 2 commits intotaskiq-python:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #620 +/- ##
==========================================
- Coverage 79.82% 79.79% -0.04%
==========================================
Files 69 69
Lines 2528 2529 +1
==========================================
Hits 2018 2018
- Misses 510 511 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
First off, can you please run And, second thing. Can you please tell me how to run it properly? Because right now with the following code: from taskiq_redis import ListQueueBroker
from taskiq.middlewares import PrometheusMiddleware
broker = ListQueueBroker("redis://localhost").with_middlewares(PrometheusMiddleware())If you run it with
Then |
Fixed
It's happening because we create a new registry that doesn't have default python metrics, so there're no metrics at the time of worker startup. You can execute a task and then the metrics will be populated |
Replaces global prometheus REGISTRY with a new CollectorRegistry