3scale / apisonator

Red Hat 3scale API Management Apisonator backend
https://3scale.net
Apache License 2.0
36 stars 27 forks source link

Expose queue sizes via Prometheus metrics #296

Open davidor opened 3 years ago

davidor commented 3 years ago

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.

slopezz commented 3 years ago

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.