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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]