Unlink peer spans from their creation details.

This commit is contained in:
Henry de Valence 2019-10-22 10:23:35 -07:00
parent 6faebe844c
commit 121cea610b
1 changed files with 4 additions and 1 deletions

View File

@ -76,7 +76,10 @@ where
let (tcp_stream, addr) = req;
let connector_span = span!(Level::INFO, "connector", addr = ?addr);
let connection_span = span!(Level::INFO, "peer", addr = ?addr);
// set parent: None for the peer connection span, as it should exist
// independently of its creation source (inbound connection, crawler,
// initial peer, ...)
let connection_span = span!(parent: None, Level::INFO, "peer", addr = ?addr);
// Clone these upfront, so they can be moved into the future.
let nonces = self.nonces.clone();