mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
sending.rs: record handler errors using Display
This commit is contained in:
parent
fb52ded222
commit
25353da8b8
1 changed files with 6 additions and 1 deletions
|
|
@ -232,11 +232,12 @@ impl Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(
|
#[tracing::instrument(
|
||||||
skip(self, handler_span, current_transaction_status),
|
skip(self, result, handler_span, current_transaction_status),
|
||||||
fields(
|
fields(
|
||||||
current_status = ?current_transaction_status.get(
|
current_status = ?current_transaction_status.get(
|
||||||
&destination
|
&destination
|
||||||
),
|
),
|
||||||
|
error,
|
||||||
),
|
),
|
||||||
)]
|
)]
|
||||||
fn handle_response(
|
fn handle_response(
|
||||||
|
|
@ -251,6 +252,10 @@ impl Service {
|
||||||
// clone() is required for the relationship to show up in jaeger
|
// clone() is required for the relationship to show up in jaeger
|
||||||
Span::current().follows_from(handler_span.clone());
|
Span::current().follows_from(handler_span.clone());
|
||||||
|
|
||||||
|
if let Err(e) = &result {
|
||||||
|
Span::current().record("error", e.to_string());
|
||||||
|
}
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
self.db.delete_all_active_requests_for(&destination)?;
|
self.db.delete_all_active_requests_for(&destination)?;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue