Skip to content

Commit a0ce00e

Browse files
authored
refactor(iroh-net): Attach Relay URL to a connecting client span (#2817)
## Description The client already has a connecting span tying together everything that is happening for connect. But it doesn't yet say which relay this is for. Add the RelayURL as a span field. ## Breaking Changes None ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] 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. - [x] Tests if relevant. - [x] All breaking changes documented.
1 parent f08011a commit a0ce00e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

iroh-net/src/relay/client.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ impl Actor {
570570
if self.is_closed {
571571
return Err(ClientError::Closed);
572572
}
573+
let url = self.url.clone();
573574
async move {
574575
if self.relay_conn.is_none() {
575576
trace!("no connection, trying to connect");
@@ -589,7 +590,7 @@ impl Actor {
589590

590591
Ok((conn, receiver))
591592
}
592-
.instrument(info_span!("connect"))
593+
.instrument(info_span!("connect", %url))
593594
.await
594595
}
595596

0 commit comments

Comments
 (0)