feat(metrics): add support for gauge metrics and include IMC metrics (#4939)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Chethan Rao
2024-06-11 20:22:20 +05:30
committed by GitHub
parent a949676f8b
commit 42cd769407
10 changed files with 95 additions and 4 deletions

View File

@ -207,6 +207,16 @@ impl Cache {
pub async fn remove(&self, key: CacheKey) {
self.inner.invalidate::<String>(&key.into()).await;
}
/// Performs any pending maintenance operations needed by the cache.
pub async fn run_pending_tasks(&self) {
self.inner.run_pending_tasks().await;
}
/// Returns an approximate number of entries in this cache.
pub fn get_entry_count(&self) -> u64 {
self.inner.entry_count()
}
}
#[instrument(skip_all)]