grpc-opentracing icon indicating copy to clipboard operation
grpc-opentracing copied to clipboard

How to avoid logging a cancelled operation as an error?

Open bboreham opened this issue 7 years ago • 1 comments

In our system we fire off calls to multiple servers, use the results that come back first and cancel the slowest ones. Unfortunately the cancelled ones show up as an error in tracing, because of this line

Any suggestions how to improve this? Could be another kind of Option ?

(I can write the PR if you think the idea is worthwhile)

bboreham avatar Jun 08 '18 16:06 bboreham

I followed the code through a little further to SetSpanTags where it correctly detects the operation was cancelled which is in "Success" class, but because client is true it is set as an error.

Could we have Success override client ? What was the intention of that line?

bboreham avatar Sep 05 '18 13:09 bboreham