apisonator
apisonator copied to clipboard
Expose queue sizes via Prometheus metrics
In some environments, that's done using a Redis exporter. However, that's not available in some setups. For that reason, it'd be nice if the Apisonator workers exposed the queue sizes via Prometheus.
One problem of redis exporter, is that when a queue is empty, there is no key in redis, so its value does not exist. Because of that reason, you can not define alerts checking increments over time using functions like predict linear, because you need a 0 value if queue is empty.
So it would be nice to return a 0 in case a queue is empty instead of not returning any value.