diff options
Diffstat (limited to 'src/metrics.c')
| -rw-r--r-- | src/metrics.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/metrics.c b/src/metrics.c index eb50f09..c1113a7 100644 --- a/src/metrics.c +++ b/src/metrics.c @@ -10,6 +10,7 @@ prom_counter_t *meta = NULL; prom_counter_t *peers = NULL; prom_gauge_t *current_hashes = NULL; prom_counter_t *hashes = NULL; +prom_gauge_t *hashes_size = NULL; prom_counter_t *hash_expired = NULL; prom_gauge_t *hash_next_expire = NULL; prom_counter_t *queries = NULL; @@ -132,6 +133,15 @@ void metric_init() { ) ); + hashes_size = prom_collector_registry_must_register_metric( + prom_gauge_new( + "dht_hashes_size", + "InfoHash table capacity", + 0, + NULL + ) + ); + hash_expired = prom_collector_registry_must_register_metric( prom_counter_new( "dht_hashes_expired_total", |
