Closed hbjydev closed 3 months ago
Hello Hayden. Currently it's not possible to add custom metrics and I think adding custom metrics would require lots of work. Why do you want to visualize database and model metrics? What's the end goal?
The end goal would primarily be end-to-end visibility into how the app is performing, as well as gathering a sense of what the system being "healthy" looks like. i.e. if the number of models being inserted by the send_email_confirmation
task drops off a cliff but the task execution count remains steady, there's likely a problem with the server running our Celery tasks.
drops off a cliff but the task execution count remains steady
If the task is synchronous shouldn't it only complete once all the database queries are executed?
@danihodovic It's not so much about making sure that DB queries have happened so much as monitoring how much is going on in the system.
It sounds like too much effort to instrument the celery-exporter in order to monitor systems that the celery processes connect to. It's probably better to add dedicated exporters, such as the Postgres exporter, and use that in conjunction with celery-exporter to get a better understanding of system performance.
Hi Dani Hodovic! I also need to collect custom metrics from celery workers. I'm using lots of external API in my workers and it is very critical to see if there are any non 2xx responses. Is it possible to achieve using that library?
No, see the above comment.
So we're investigating using
django-prometheus
to expose metrics from our web servers, but we have a lot of Celery tasks running that we would want to be able to instrument using the same metrics (thinking about things like database stats, model metrics, custom metrics, etc.). Is there any way that we would be able to achieve this usingcelery-exporter
? I'm aware it might not be the primary purpose of this library, but I'd also be open to other ideas.I thought about using Pushgateway for this use case, but I don't know how it'd work logistically.
Any help would be useful! :)