наблюдаемость: завершить базовый контур Community
Добавить структурированные журналы, метрики, трассировку и безопасный канал критических ошибок. Усилить границы рантайма, тесты, проверку зависимостей и сценарии развёртывания.
This commit is contained in:
@@ -166,6 +166,7 @@ pub fn build_app(state: AppState) -> Router {
|
||||
|
||||
Router::new()
|
||||
.route("/health", get(crate::routes::health))
|
||||
.route("/ready", get(crate::routes::readiness))
|
||||
.nest(
|
||||
"/api/auth",
|
||||
Router::new()
|
||||
@@ -178,6 +179,9 @@ pub fn build_app(state: AppState) -> Router {
|
||||
apply_api_rate_limit,
|
||||
))
|
||||
.layer(middleware::from_fn(apply_request_context))
|
||||
.layer(middleware::from_fn(
|
||||
crank_observability::record_http_request,
|
||||
))
|
||||
.with_state(state)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user