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/02 01:46:14 UTC
[GitHub] [skywalking] zturning commented on issue #3243: Webflux plugin
optimization
zturning commented on issue #3243: Webflux plugin optimization
URL: https://github.com/apache/skywalking/pull/3243#issuecomment-526974624
the webflux agent will throw ClassCastException, and can not collect span info when defining:
```java
@Component
public class MyFilter implements WebFilter {
@Override
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
return chain.filter(new MyServerWebExchangeDecorator(exchange));
}
public static class MyServerWebExchangeDecorator extends ServerWebExchangeDecorator {
public MyServerWebExchangeDecorator(ServerWebExchange delegate) {
super(delegate);
}
}
}
```
and can fixing it by:
```java
public class DefaultServerWebExchangeInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
@Override
protected ClassMatch enhanceClass() {
return byHierarchyMatch(new String[] {"org.springframework.web.server.ServerWebExchange"});
}
......
}
```
----------------------------------------------------------------
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