wu-sheng closed pull request #1039: fix grpc issue
URL: https://github.com/apache/incubator-skywalking/pull/1039
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/BlockingCallClientInterceptor.java
 
b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/BlockingCallClientInterceptor.java
index ce74a8f74..aa713e344 100644
--- 
a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/BlockingCallClientInterceptor.java
+++ 
b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/BlockingCallClientInterceptor.java
@@ -75,7 +75,7 @@ protected CallListener(Listener delegate) {
 
         @Override public void onClose(Status status, Metadata trailers) {
             delegate().onClose(status, trailers);
-            if (status.isOk()) {
+            if (!status.isOk()) {
                 AbstractSpan activeSpan = ContextManager.activeSpan();
                 activeSpan.errorOccurred().log(status.getCause());
                 Tags.STATUS_CODE.set(activeSpan, status.getCode().name());


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to