Exporting custom metrics from non-http endpoints like celery

243 views
Skip to first unread message

arijit desai

unread,
Mar 9, 2021, 5:01:25 PM3/9/21
to Prometheus Users
Hi Team,

I am trying to monitor an django application using prometheus. I am already using celery-exporter to export the celery tasks. But I also want to monitor the functions/methods that the celery tasks execute. For example,

I have celery beat to call hello() method for every 5 seconds. So I will get the metrics of method hello(). 

@celery.shared_task(bind=True)
def hello():
       job.callToPrint()

But I also want to add custom metrics to method callToPrint() and expose it to Prometheus. Any idea how can I do it?

Regards,
Arijit
Reply all
Reply to author
Forward
0 new messages