Skip to content

Commit b06dac0

Browse files
committed
session: emit trace-level log on request timeout
It looks weird that we don't log anything when a request times out; this way the logs of a single execution get cut off without any indication of what happened. This change adds a trace-level log message when a request times out.
1 parent 194e155 commit b06dac0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scylla/src/client/session.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,14 @@ impl Session {
20312031
|_: tokio::time::error::Elapsed| {
20322032
#[cfg(feature = "metrics")]
20332033
self.metrics.inc_request_timeouts();
2034-
Err(RequestError::RequestTimeout(timeout))
2034+
2035+
let timeout_error = RequestError::RequestTimeout(timeout);
2036+
trace!(
2037+
parent: request_span.span(),
2038+
error = %timeout_error,
2039+
"Request timed out"
2040+
);
2041+
Err(timeout_error)
20352042
},
20362043
),
20372044
None => runner.await,

0 commit comments

Comments
 (0)