sending.rs: record handler errors using Display

This commit is contained in:
Lambda 2024-05-24 16:20:00 +00:00
parent fb52ded222
commit 25353da8b8

View file

@ -232,11 +232,12 @@ impl Service {
}
#[tracing::instrument(
skip(self, handler_span, current_transaction_status),
skip(self, result, handler_span, current_transaction_status),
fields(
current_status = ?current_transaction_status.get(
&destination
),
error,
),
)]
fn handle_response(
@ -251,6 +252,10 @@ impl Service {
// clone() is required for the relationship to show up in jaeger
Span::current().follows_from(handler_span.clone());
if let Err(e) = &result {
Span::current().record("error", e.to_string());
}
match result {
Ok(()) => {
self.db.delete_all_active_requests_for(&destination)?;