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 2019/09/05 06:19:43 UTC

[GitHub] [skywalking] zhaoyuguang opened a new pull request #3419: Gateway & Webflux plugin compatible with these scene

zhaoyuguang opened a new pull request #3419: Gateway & Webflux plugin compatible with these scene
URL: https://github.com/apache/skywalking/pull/3419
 
 
   Please answer these questions before submitting pull request
   
   - Why submit this pull request?
   - [x] Bug fix
   - [ ] New feature provided
   - [ ] Improve performance
   ___
   ### Bug fix
   - Bug description.
   
   When you access a Gateway API case Exception through a browser, the class that handles the respone is`org.springframework.web.reactive.function.server.DefaultEntityResponseBuilder$DefaultEntityResponse`,  recurrence process: 
   ![image](https://user-images.githubusercontent.com/10150229/64316365-2e23bd80-cfe7-11e9-893a-e131179c7e55.png)
   
   - How to fix?
   Add this class at BodyInserterResponseInstrumentation and rename it to AbstractServerResponseInstrumentation
   
   - Bug description.
   
   When we use Filter, the ServerWebExchange of DispatcherHandlerHandle is a proxy class, but when the API case abnormal, the ServerWebExchange of AbstractServerResponse exchanges the real object, so I put the span in the real object.
   
   - How to fix?
   ```java
       public static EnhancedInstance getInstance(Object o) {
           EnhancedInstance instance = null;
           if (o instanceof ServerWebExchangeDecorator) {
               ServerWebExchange delegate = ((ServerWebExchangeDecorator) o).getDelegate();
               if (delegate instanceof DefaultServerWebExchange) {
                   instance = (EnhancedInstance) delegate;
               }
           } else if (o instanceof DefaultServerWebExchange) {
               instance = (EnhancedInstance) o;
           }
           return instance;
       }
   ```
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services