Collect metrics about webhook rate limit cache size

This commit is contained in:
Ske
2020-04-16 18:20:53 +02:00
parent 93bf7c6543
commit 05595329b5
3 changed files with 7 additions and 1 deletions

View File

@@ -24,6 +24,8 @@ namespace PluralKit.Bot
_logger = logger.ForContext<WebhookRateLimitService>();
}
public int CacheSize => _info.Count;
public bool TryExecuteWebhook(IWebhook webhook)
{
// If we have nothing saved, just allow it (we'll save something once the response returns)