You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/07/29 12:28:28 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #7389: fix: fix spring gateway plugin npe

wu-sheng commented on a change in pull request #7389:
URL: https://github.com/apache/skywalking/pull/7389#discussion_r679103936



##########
File path: apm-sniffer/apm-sdk-plugin/spring-plugins/spring-webflux-5.x-webclient-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/webclient/WebFluxWebClientInterceptor.java
##########
@@ -79,15 +78,12 @@ public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allA
         }
         Mono<ClientResponse> ret1 = (Mono<ClientResponse>) ret;
         AbstractSpan span = (AbstractSpan) context.getContext();
-        return ret1.doAfterSuccessOrError(new BiConsumer<ClientResponse, Throwable>() {
-            @Override
-            public void accept(ClientResponse clientResponse, Throwable throwable) {
-                HttpStatus httpStatus = clientResponse.statusCode();
-                if (httpStatus != null) {
-                    Tags.STATUS_CODE.set(span, Integer.toString(httpStatus.value()));
-                    if (httpStatus.isError()) {
-                        span.errorOccurred();
-                    }
+        return ret1.doOnSuccess(clientResponse -> {

Review comment:
       So, even the response code is 5xx, this method would be called?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org