Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
feat: create logging span
Browse files Browse the repository at this point in the history
  • Loading branch information
arein committed Aug 5, 2023
1 parent fb97579 commit f7bb1f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/websocket_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,22 @@ async fn handle_msg(
client: &Arc<relay_client::websocket::Client>,
) -> Result<()> {
info!("Websocket service received message: {:?}", msg);
let topic = msg.topic.clone();
let _span = tracing::warn_span!(
"", topic = %topic, rpc_id = %msg.message_id,
);
match msg.tag {
4004 => {
let topic = msg.topic.clone();
info!("Received push delete for topic: {}", topic);
push_delete::handle(msg, state, client).await?;
info!("Finished processing push delete for topic: {}", topic);
}
4006 => {
let topic = msg.topic.clone();
info!("Received push subscribe on topic: {}", &topic);
push_subscribe::handle(msg, state, client).await?;
info!("Finished processing push subscribe for topic: {}", topic);
}
4008 => {
let topic = msg.topic.clone();
info!("Received push update on topic: {}", &topic);
push_update::handle(msg, state, client).await?;
info!("Finished processing push update for topic: {}", topic);
Expand Down

0 comments on commit f7bb1f7

Please sign in to comment.