remove unnecessary spans

This commit is contained in:
Christien Rioux 2024-07-22 09:54:10 -04:00
parent b091c78539
commit bcb9f2a96c
3 changed files with 4 additions and 5 deletions

View File

@ -58,6 +58,7 @@ impl Network {
match ph match ph
.recv_message(&mut data) .recv_message(&mut data)
.timeout_at(stop_token.clone()) .timeout_at(stop_token.clone())
.in_current_span()
.await .await
{ {
Ok(Ok((size, flow))) => { Ok(Ok((size, flow))) => {
@ -90,7 +91,7 @@ impl Network {
// Now we wait for join handles to exit, // Now we wait for join handles to exit,
// if any error out it indicates an error needing // if any error out it indicates an error needing
// us to completely restart the network // us to completely restart the network
while let Some(v) = protocol_handlers_unordered.next().await { while let Some(v) = protocol_handlers_unordered.next().in_current_span().await {
// true = stopped, false = errored // true = stopped, false = errored
if !v { if !v {
// If any protocol handler fails, our socket died and we need to restart the network // If any protocol handler fails, our socket died and we need to restart the network
@ -99,7 +100,7 @@ impl Network {
} }
log_net!("UDP listener task stopped"); log_net!("UDP listener task stopped");
}); }.instrument(trace_span!(parent: None, "UDP Listener")));
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Add to join handle // Add to join handle

View File

@ -1674,7 +1674,6 @@ impl RPCProcessor {
} }
} }
#[instrument(level="trace", target="rpc", skip_all)]
async fn rpc_worker( async fn rpc_worker(
self, self,
stop_token: StopToken, stop_token: StopToken,

View File

@ -126,7 +126,7 @@ impl<E: Send + 'static> TickTask<E> {
if opt_stop_source.is_some() { if opt_stop_source.is_some() {
// See if the previous execution finished with an error // See if the previous execution finished with an error
match self.single_future.check().in_current_span().await { match self.single_future.check().await {
Ok(Some(Err(e))) => { Ok(Some(Err(e))) => {
// We have an error result, which means the singlefuture ran but we need to propagate the error // We have an error result, which means the singlefuture ran but we need to propagate the error
return Err(e); return Err(e);
@ -163,7 +163,6 @@ impl<E: Send + 'static> TickTask<E> {
match self match self
.single_future .single_future
.single_spawn(&self.name, wrapped_routine) .single_spawn(&self.name, wrapped_routine)
.in_current_span()
.await .await
{ {
// We should have already consumed the result of the last run, or there was none // We should have already consumed the result of the last run, or there was none