Skip to content

tor-circmgr: Add UniqId to circuit errors

gabi-250 requested to merge gabi-250/arti:uniq-id-logging into main

This adds the UniqId of the circuit to tor_circmgr::Error where possible.

This change should enable us to correlate any circuit errors reported from tor-hsclient or tor-hsservice with the corresponding tor_proto::circuit logs.

For example, including the UniqId in tor_circmgr::Error::Protocol enables us to tell which circuit (1.4) this ipt_establisher circuit error relates to:

2000-01-01T00:15:02Z TRACE tor_proto::circuit::reactor: Circ 1.4: handling cell: Destroy(Destroy { reason: DestroyReason(DESTROYED) })
2000-01-01T00:15:02Z DEBUG tor_proto::circuit::reactor: Circ 1.4: Received DESTROY cell. Reason: Circuit was destroyed without client truncate [DESTROYED]
2000-01-01T00:15:02Z TRACE tor_proto::circuit::reactor: Circ 1.4: reactor shutdown due to handled cell
2000-01-01T00:15:02Z TRACE tor_proto::circuit::reactor: Circ 1.4: Circuit reactor stopped: Ok(())
2000-01-01T00:15:02Z DEBUG tor_hsservice::svc::ipt_establish: tgen_hs: Problem establishing introduction point with ed25519:4ngwAxQ6Zw2VJB241CenzfrVtT6omCDOf9yGB1XAqTs $a52ca5b56c64d864f6ae43e56f29acbd5706dda1: error: Unable to build circuit to introduction point: Problem building circuit 1.4, while extending to chosen HS hop: Circuit closed

Closes #1297 (closed)

Merge request reports