restify / clients

HttpClient, StringClient, and JsonClient extracted from restify
MIT License
57 stars 34 forks source link

request errors could provide socket details #111

Closed davepacheco closed 6 years ago

davepacheco commented 7 years ago

Similar to #104, it would be helpful if just about every request error included IP and port information so that we knew who we were talking to. Once #109 is landed, I'm happy to take a swing at this using that change as a model.

For context, we had a bug during network partitions where we ended up trying to use a client socket that the server had already closed, but because of the partition, the client didn't know that the server had closed it. All we got back from restify is "read ECONNRESET". We hit this again in a preproduction environment where we think there was a network partition limited to some components, and if we knew the IP addresses involved in these requests, we could have confirmed that.

We've also had issues where only some instances of a service were affected by a bug, and in that case it's really helpful if the client errors include the IPs of the instances they were talking to.

DonutEspresso commented 6 years ago

In #109, we added the following verror info fields to all request errors (not just Request/Connect/DNSTimeout):