Skip to content

Commit

Permalink
fix: add cache_key tag to capture loaded tokens metric (#24880)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankh authored Sep 11, 2024
1 parent 7392662 commit d26be62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rust/capture/src/limiters/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d26be62

Please sign in to comment.