Skip to content

Commit

Permalink
♻️🔊 Update trace error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Evaline Ju <[email protected]>
  • Loading branch information
evaline-ju committed Dec 18, 2024
1 parent c3eece4 commit 594bd42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
10 changes: 2 additions & 8 deletions src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,17 +522,11 @@ impl OnFailure<GrpcFailureClass> for ClientOnFailure {

let (status_code, error) = match failure_classification {
GrpcFailureClass::Code(code) => {
error!(
?trace_id,
code, latency_ms, "gRPC client failed to handle request",
);
error!(?trace_id, code, latency_ms, "failure handling request",);
(Some(grpc_to_http_code(tonic::Code::from(code.get()))), None)
}
GrpcFailureClass::Error(error) => {
error!(
?trace_id,
latency_ms, "gRPC client failed to handle request: {}", error,
);
error!(?trace_id, latency_ms, "failure handling request: {}", error,);
(None, Some(error))
}
};
Expand Down
7 changes: 2 additions & 5 deletions src/clients/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,12 @@ impl OnFailure<ServerErrorsFailureClass> for ClientOnFailure {
?trace_id,
?status_code,
latency_ms,
"HTTP client failed to handle request",
"failure handling request",
);
(Some(status_code), None)
}
ServerErrorsFailureClass::Error(error) => {
error!(
?trace_id,
latency_ms, "HTTP client failed to handle request: {}", error,
);
error!(?trace_id, latency_ms, "failure handling request: {}", error,);
(None, Some(error))
}
};
Expand Down

0 comments on commit 594bd42

Please sign in to comment.