From d26be62ac9bd156ba1290aa56c397b01b6bd7a8e Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 11 Sep 2024 09:04:15 +0100 Subject: [PATCH] fix: add cache_key tag to capture loaded tokens metric (#24880) --- rust/capture/src/limiters/redis.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/capture/src/limiters/redis.rs b/rust/capture/src/limiters/redis.rs index 1a59ddd3b0b54..0142e160d8191 100644 --- a/rust/capture/src/limiters/redis.rs +++ b/rust/capture/src/limiters/redis.rs @@ -102,7 +102,11 @@ impl RedisLimiter { match RedisLimiter::fetch_limited(&redis, &key).await { Ok(set) => { let set = HashSet::from_iter(set.iter().cloned()); - gauge!("capture_billing_limits_loaded_tokens",).set(set.len() as f64); + gauge!( + "capture_billing_limits_loaded_tokens", + "cache_key" => key.clone(), + ) + .set(set.len() as f64); let mut limited_lock = limited.write().await; *limited_lock = set;