diff --git a/node/src/http_client.rs b/node/src/http_client.rs index 7b53a0176..7538b2855 100644 --- a/node/src/http_client.rs +++ b/node/src/http_client.rs @@ -22,8 +22,10 @@ pub async fn message( url: U, message: MpcMessage, ) -> Result<(), SendError> { + let _span = tracing::info_span!("message_request"); let mut url = url.into_url().unwrap(); url.set_path("msg"); + tracing::debug!(%url, "making http request"); let action = || async { let response = client .post(url.clone()) @@ -56,18 +58,16 @@ pub async fn message( Retry::spawn(retry_strategy, action).await } -pub async fn join( - client: &Client, - url: U, - participant: &Participant, -) -> Result<(), SendError> { +pub async fn join(client: &Client, url: U, me: &Participant) -> Result<(), SendError> { + let _span = tracing::info_span!("join_request", ?me); let mut url = url.into_url().unwrap(); url.set_path("join"); + tracing::debug!(%url, "making http request"); let action = || async { let response = client .post(url.clone()) .header("content-type", "application/json") - .json(&participant) + .json(&me) .send() .await .map_err(SendError::ReqwestClientError)?;