Skip to content

Commit eb9c4d2

Browse files
committed
ref(iroh-net): Do not add the NodeId in the magicsock span field
Since we have made MagicSock private it should always be created via the Endpoint, unless we are internally messing around with tests or so. Because of this we can make sure that the Endpoint always attaches the correct "me" field to the span. Reducing the amount of noise in the default log output.
1 parent 34ec5e2 commit eb9c4d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iroh-net/src/magicsock.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ impl MagicSock {
12441244
}
12451245

12461246
/// Triggers an address discovery. The provided why string is for debug logging only.
1247-
#[instrument(skip_all, fields(me = %self.me))]
1247+
#[instrument(skip_all)]
12481248
fn re_stun(&self, why: &'static str) {
12491249
debug!("re_stun: {}", why);
12501250
inc!(MagicsockMetrics, re_stun_calls);
@@ -1371,8 +1371,8 @@ impl Handle {
13711371
);
13721372
}
13731373

1374-
Self::with_name(me.clone(), opts)
1375-
.instrument(error_span!("magicsock", %me))
1374+
Self::with_name(me, opts)
1375+
.instrument(error_span!("magicsock"))
13761376
.await
13771377
}
13781378

0 commit comments

Comments
 (0)