-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't trace gRPC "Canceled" errors #1353
Don't trace gRPC "Canceled" errors #1353
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Could you sign the commit?
654c28f
to
0dfc21e
Compare
I think that I signed the commit but please let me know if something's wrong as I'm new to git signatures. |
@caboteria Seems like it still requires to sign the commit. See at DCO check https://github.com/networkservicemesh/sdk/pull/1353/checks?check_run_id=8351758816 In short, you can just do something simple like
|
We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io>
0dfc21e
to
5e5cfb5
Compare
Ah, I get it. Unfortunately confusing git terminology! I was signing the commit (-S) but it sounds like you want me to signoff (-s) the commit. It should be all set now, I did both. |
@acnodal-tc It's a useful fix. Thanks! |
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1353 Commit: 97e00ec Author: toby cabot Date: 2022-09-14 19:33:40 -0400 Message: - Don't trace gRPC "Canceled" errors (#1353) We were getting a *lot* of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again. This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors. https://pkg.go.dev/google.golang.org/grpc/status#Code https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: Toby Cabot <toby@acnodal.io> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Thank you for your patience in helping me get the patch in shape to merge! |
Description
We were getting a lot of log chaff at TRACE level during normal operation because gRPC returns a "context canceled" error periodically but it's not really an error for us because we immediately loop around again.
This commit uses the gRPC status.Code() method to identify these non-errors. It also uses errors.Is() instead of == to compare error objects. This handles wrapped errors.
https://pkg.go.dev/google.golang.org/grpc/status#Code
https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features
Issue link
#1068
How Has This Been Tested?
Deploy cmd-nse-icmp-responder, see periodic "context cancelled" errors, deploy build with patched SDK, verify that errors aren't present.
Types of changes
Only relevant when running at TRACE log level.