-
Notifications
You must be signed in to change notification settings - Fork 23
Implement std::fmt::Debug for eventstore::Connection #36
Comments
Hi @wingertge, Thanks for reporting this issue. I see nothing preventing an |
The project is still in very early stages and have a workaround for now so no rush. I'm waiting for futures-0.3 update as well (tried updating it myself but I'm not super familiar with Rust yet and got hung up on lifetime stuff). So as long as that change is in the futures-0.3 release I'm good. |
I’m working on the futures 0.3 migration. Still a lot to do but at least, I have no blocker, unlike 2 weeks ago. |
Just a quick update, I'm not sure if this is possible with the way the architecture works, but if the Debug output could log the connection type (single/cluster), as well as the SocketAddr of the current node, that would be ideal. Knowing the exact server can really help for tracing in distributed services. If I remember the code correctly this might mean implementing Debug for the Driver as well. |
I could easily expose if a connection is in single-node or cluster mode. However, getting the current |
I can also just do a quick PR once you're done with new-futures. Btw I'm already using that branch (I don't use subscriptions atm) and it's working perfectly in a real world scenario 👍 |
@wingertge |
I'm trying to use the tracing crate to monitor my functions that access eventstore and detect any potential bottlenecks, but its instrumentation requires all parameters to implement fmt::Debug. Connection doesn't implement that right now, forcing me to wrap and unwrap the connection to enable proper instrumentation. Implementing Debug on the Connection struct would solve this issue.
I'm not making a pull request because I'm not sure about the internals of the crate, so I don't know what should be output in the Debug fmt.
The text was updated successfully, but these errors were encountered: