Skip to content

Commit

Permalink
refactor(iroh-net): Attach Relay URL to a connecting client span (#2817)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
flub authored Oct 18, 2024
1 parent f08011a commit a0ce00e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iroh-net/src/relay/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ impl Actor {
if self.is_closed {
return Err(ClientError::Closed);
}
let url = self.url.clone();
async move {
if self.relay_conn.is_none() {
trace!("no connection, trying to connect");
Expand All @@ -589,7 +590,7 @@ impl Actor {

Ok((conn, receiver))
}
.instrument(info_span!("connect"))
.instrument(info_span!("connect", %url))
.await
}

Expand Down

0 comments on commit a0ce00e

Please sign in to comment.