Open mxinden opened 1 year ago
Is there an elegant way to expose more information than IncomingConnectionError::TransportErrorOther on transport specific errors without depending on concrete types?
IncomingConnectionError::TransportErrorOther
We could use std::any::type_name.
std::any::type_name
It would be good to know why in particular incoming connections on the Kademlia Exporter fail. See e.g. Incoming error per second graph.
https://github.com/libp2p/rust-libp2p/blob/1a85e24ef94eba2a79104d13e89b0891bf5997d4/misc/metrics/src/swarm.rs#L361-L370
TransportError::Other is an io::Error. You could display the io::Error kind.
TransportError::Other
io::Error
Alternatively, you could capture richer information in the first place and create more variants for the errors you'd like to see.
Description
Is there an elegant way to expose more information than
IncomingConnectionError::TransportErrorOther
on transport specific errors without depending on concrete types?We could use
std::any::type_name
.Motivation
It would be good to know why in particular incoming connections on the Kademlia Exporter fail. See e.g. Incoming error per second graph.
https://github.com/libp2p/rust-libp2p/blob/1a85e24ef94eba2a79104d13e89b0891bf5997d4/misc/metrics/src/swarm.rs#L361-L370