OvalMoney / celery-exporter

Prometheus metrics exporter for Celery
MIT License
142 stars 37 forks source link

Customize Histogram for `TASKS_RUNTIME` and `LATENCY` #22

Open vinayan3 opened 4 years ago

vinayan3 commented 4 years ago

The default histogram buckets are on the order of miliseconds and seconds. For celery if you have long running tasks like re-encoding a video and then uploading gigabyte sized files it puts all the tasks in the INF bucket. A solution could be to add a config.py which lets you customize the histogram. The super nice part is that it'd be pretty easy to put the file as a ConfigMap in Kubernetes or build the container with the extra file(basically as an overlay).

I'm happy to put up a pull request for this would be useful for the community.

pskopnik commented 4 years ago

This would be super useful for me as well :+1:

A solution could be to add a config.py which lets you customize the histogram.

I think specifying the values as a comma-separated list in the command options would suffice. A .py would only have the advantage to dynamically choose bucket values, which is probably hard to do sensibly while maintaining stable time series.

An alternative would be to use summary metrics instead or additionally to the histogram metrics.

toothstone commented 3 years ago

This would be super helpful, so far there seems to be no celery exporter with such a feature.

17 would solve this, is there a way to help getting that merged?