grpc-node
grpc-node copied to clipboard
grpc-js: Add more info to deadline exceeded errors
Currently, the details string in a client-side deadline exceeded error is just "Deadline exceeded". This change adds more information to that, to help narrow down the cause of those errors. Specifically, it shows a breakdown of any time taken before the request was actually sent to a specific server, along with the address of the server if it was sent. For example, an error string from a test with all information shown looks like this:
Deadline exceeded after 1.001s,name resolution: 0.000s,metadata filters: 0.002s,previous attempts: 0,time to current attempt start: 0.001s,LB pick: 0.006s,remote_addr=[::1]:45251
This is just a first pass to get some useful information into the error string, and to add the framework to add or change individual pieces of information there as necessary.
This should largely address #2687.