Skip to content

feat: add new Prometheus metric for Redis connection pool size

João Pereira requested to merge add-redis-max-conns into master

Related to #758 (closed).

While working on the new Grafana dashboard for Redis, I noticed that we're currently unable to calculate the connection pool saturation because we're missing a metric for the configured pool size/maximum number of connections. This happens because the Redis client PoolStats does not expose such an attribute. This MR adds the ability to configure the pool size for metric purposes and emits a new gauge Prometheus metric for it:

# HELP registry_redis_pool_stats_max_conns The maximum number of connections in the pool.
# TYPE registry_redis_pool_stats_max_conns gauge
registry_redis_pool_stats_max_conns{instance="cache"} 10
Edited by João Pereira

Merge request reports