From 142ed182542482164bfec5e46712e0c59235ad7a Mon Sep 17 00:00:00 2001 From: Anna Khanova Date: Wed, 17 Apr 2024 12:59:53 +0200 Subject: [PATCH] Review --- proxy/src/cache/endpoints.rs | 4 ++-- proxy/src/context.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/proxy/src/cache/endpoints.rs b/proxy/src/cache/endpoints.rs index 7a8e9fdbdc..72543c6408 100644 --- a/proxy/src/cache/endpoints.rs +++ b/proxy/src/cache/endpoints.rs @@ -74,7 +74,7 @@ impl EndpointsCache { if self.config.disable_cache { let rejected = self.should_reject(endpoint); ctx.set_rejected(rejected); - info!(?rejected); + info!(?rejected, "check endpoint is valid, disabled cache"); return true; } // If the limiter allows, we don't need to check the cache. @@ -82,7 +82,7 @@ impl EndpointsCache { return true; } let rejected = self.should_reject(endpoint); - info!(?rejected); + info!(?rejected, "check endpoint is valid, enabled cache"); ctx.set_rejected(rejected); !rejected } diff --git a/proxy/src/context.rs b/proxy/src/context.rs index eb97705edb..8c11ce83b9 100644 --- a/proxy/src/context.rs +++ b/proxy/src/context.rs @@ -204,7 +204,8 @@ impl Drop for RequestMonitoring { .as_ref() .map(|x| x.as_str()) .unwrap_or_default(); - info!(?ep, ?outcome, ?rejected); + // This makes sense only if cache is disabled + info!(?ep, ?outcome, ?rejected, "check endpoint is valid with outcome"); Metrics::get() .proxy .invalid_endpoints_total