Skip to content

Commit

Permalink
refactor(webhooks): use in_current_span() when triggering webhook t…
Browse files Browse the repository at this point in the history
…o merchant using `tokio::spawn()`
  • Loading branch information
SanchithHegde committed Feb 8, 2024
1 parent 93481a8 commit f60a98d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/router/src/core/webhooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ use api_models::{
use common_utils::{errors::ReportSwitchExt, events::ApiEventsType, request::RequestContent};
use error_stack::{report, IntoReport, ResultExt};
use masking::ExposeInterface;
use router_env::{instrument, tracing, tracing_actix_web::RequestId};
use router_env::{
instrument,
tracing::{self, Instrument},
tracing_actix_web::RequestId,
};

use super::{errors::StorageErrorExt, metrics};
#[cfg(feature = "stripe")]
Expand Down Expand Up @@ -772,7 +776,7 @@ pub async fn create_event_and_trigger_outgoing_webhook<W: types::OutgoingWebhook
logger::error!(error=?err, event=?webhook_event, "Error Logging Outgoing Webhook Event");
}
}
});
}.in_current_span());
}

Ok(())
Expand Down

0 comments on commit f60a98d

Please sign in to comment.