diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2025-07-03 19:11:11 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2025-07-03 19:11:11 +0200 |
| commit | 75e3fd649bf4baae66a7415634fe999c726ba149 (patch) | |
| tree | 8bff69c69ebdc92f9fefdfb7a95b83c680de7889 /src/proto.c | |
| parent | 570181d2004e1d07a8a4e946f352d619a5f8895f (diff) | |
Add metric for lookup state
Diffstat (limited to 'src/proto.c')
| -rw-r--r-- | src/proto.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/proto.c b/src/proto.c index e85d45e..d17f331 100644 --- a/src/proto.c +++ b/src/proto.c @@ -959,10 +959,12 @@ int proto_run(struct dht* dht, char* buff, size_t recv_len, struct sockaddr_in* } dht->lookup.state = OP_ACTIVE; + prom_gauge_set(lookup_state, dht->lookup.state, NULL); prom_counter_inc(lookup_count, NULL); dbg("Lookup started"); } else if(dht->lookup.state == OP_ACTIVE && dht->lookup.outstanding == 0) { dht->lookup.state = OP_COMPLETED; + prom_gauge_set(lookup_state, dht->lookup.state, NULL); } // @HACK 0 means unitialized, only happens in tests |
