Добавить метрику расхода ИИ-бюджета

Gauge deal.ai.budget.used.ratio{tenant} (доля израсходованного бюджета периода) собирается RuntimeDepthsCollector и публикуется DealMetricsCollector — основа для алертинга. Закрывает BL-ALERT-BUDGET.
This commit is contained in:
Rustam Khalimov
2026-09-11 17:30:26 +03:00
parent 000d433438
commit d2b716bbf4
11 changed files with 272 additions and 21 deletions
@@ -100,6 +100,8 @@ public sealed class DealMetricsCollector : IHostedService
DealMetrics.SetPipelineQueueDepth(depths.PipelineQueue);
DealMetrics.SetMlOutboxDepth(depths.MlOutbox);
DealMetrics.SetActiveSessions(depths.ActiveSessions);
DealMetrics.ReplaceBudgetRatios(
(depths.Budgets ?? []).Select(budget => (budget.TenantId, budget.UsedRatio)));
}
catch (OperationCanceledException)
{