diff --git a/lib/vmpooler/metrics/promstats.rb b/lib/vmpooler/metrics/promstats.rb index d0e1ab9..23ec64e 100644 --- a/lib/vmpooler/metrics/promstats.rb +++ b/lib/vmpooler/metrics/promstats.rb @@ -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 diff --git a/lib/vmpooler/pool_manager.rb b/lib/vmpooler/pool_manager.rb index fedc697..0580d33 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -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])