Register circuit breaker metrics in Prometheus table

This commit is contained in:
Mahima Singh 2026-01-07 14:47:22 +05:30
parent 07a73d68ae
commit a32d7c61af
2 changed files with 19 additions and 1 deletions

View file

@ -353,6 +353,24 @@ module Vmpooler
torun: %i[manager],
docstring: 'vmpooler clone metrics',
param_labels: %i[poolname]
},
circuit_breaker: {
mtype: M_GAUGE,
torun: %i[manager],
docstring: 'Circuit breaker state and failure tracking',
param_labels: %i[metric_path]
},
connection_pool: {
mtype: M_GAUGE,
torun: %i[manager],
docstring: 'Connection pool health metrics',
param_labels: %i[metric_path]
},
adaptive_timeout: {
mtype: M_GAUGE,
torun: %i[manager],
docstring: 'Adaptive timeout statistics',
param_labels: %i[metric_path]
}
}
end

View file

@ -1300,7 +1300,7 @@ module Vmpooler
health = pool.health_status
# Push metrics
# Push metrics using metric_path pattern
$metrics.gauge("connection_pool.#{provider_name}.available", health[:available])
$metrics.gauge("connection_pool.#{provider_name}.in_use", health[:in_use])
$metrics.gauge("connection_pool.#{provider_name}.utilization", health[:utilization])