наблюдаемость: ввести безопасный контракт метрик
CI / Rust Checks (push) Successful in 6m9s
CI / UI Checks (push) Successful in 5s
CI / Community Image Smoke (push) Successful in 1m3s
CI / Frontend E2E (push) Successful in 3m47s
CI / Deploy (push) Failing after 3s
CI / Rust Checks (pull_request) Successful in 6m15s
CI / UI Checks (pull_request) Successful in 5s
CI / Frontend E2E (pull_request) Successful in 5m17s
CI / Community Image Smoke (pull_request) Successful in 4m25s
CI / Deploy (pull_request) Skipped

This commit is contained in:
bsodfather committed 2026-07-31 05:04:08 +03:00
1 parent ec2453c00f
commit 9b1a739e39
50 files changed
+3066 -433

No files matched your search

+2 -5
View File
@@ -5,6 +5,7 @@ use std::{
};
use crank_core::{RateLimitDecision, RateLimitStateStore};
use crank_metrics::{LimitStage, record_limit_rejection};
use thiserror::Error;
use tracing::warn;
@@ -105,11 +106,7 @@ impl RequestRateLimiter {
}
};
if matches!(result, Err(RateLimitCheckError::Rejected(_))) {
metrics::counter!(
"crank_runtime_limit_rejections_total",
"stage" => "rate_limit"
)
.increment(1);
record_limit_rejection(LimitStage::RateLimit);
}
result
}