Skip to content

Commit 05fff6a

Browse files
authored
ref(iroh-net): Do not add the NodeId in the magicsock span field (#2679)
## Description 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. ## Breaking Changes None ## Notes & open questions Please do not merge before #2595 is merged. I'm trying to not add any further changes to that PR. ## Change checklist - [x] Self-review. - ~~[ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant.~~ - ~~[ ] Tests if relevant.~~ - ~~[ ] All breaking changes documented.~~
1 parent 34ec5e2 commit 05fff6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iroh-net/src/magicsock.rs

Lines changed: 3 additions & 3 deletions
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)