Skip to content

Commit

Permalink
add more diagnostic logs (#8153)
Browse files Browse the repository at this point in the history
Istio sets listener filter timeout to 10ms by default but requests fail from time to tome. It's very difficult to debug. Even though downstream_pre_cx_timeout_ is exposed to track the number of timeouts, it would be better to have some debug logs.

Description: add more diagnostic logs
Risk Level: low

Signed-off-by: crazyxy <yxyan@google.com>
  • Loading branch information
yxue authored and htuch committed Sep 5, 2019
1 parent 4478c19 commit d11c7e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/server/connection_handler_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ ConnectionHandlerImpl::findActiveListenerByAddress(const Network::Address::Insta
void ConnectionHandlerImpl::ActiveSocket::onTimeout() {
listener_.stats_.downstream_pre_cx_timeout_.inc();
ASSERT(inserted());
ENVOY_LOG_TO_LOGGER(listener_.parent_.logger_, debug, "listener filter times out after {} ms",
listener_.listener_filters_timeout_.count());

if (listener_.continue_on_listener_filters_timeout_) {
ENVOY_LOG_TO_LOGGER(listener_.parent_.logger_, debug, "fallback to default listener filter");
newConnection();
}
unlink();
Expand Down

0 comments on commit d11c7e7

Please sign in to comment.