Skip to content

Commit

Permalink
fix conditon
Browse files Browse the repository at this point in the history
  • Loading branch information
BIwashi committed Jun 12, 2023
1 parent 7a35033 commit b004ba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/google.golang.org/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func finishWithError(span ddtrace.Span, err error, method string, cfg *config) {
err = nil
}
errcode := status.Code(err)
if errcode == codes.OK || cfg.nonErrorCodes[errcode] || cfg.nonErrorFunc != nil || cfg.nonErrorFunc(method, err) {
if errcode == codes.OK || cfg.nonErrorCodes[errcode] || (cfg.nonErrorFunc != nil && cfg.nonErrorFunc(method, err)) {
err = nil
}
span.SetTag(tagCode, errcode.String())
Expand Down

0 comments on commit b004ba5

Please sign in to comment.