You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/07/11 00:27:08 UTC
[GitHub] 34176470 opened a new issue #225: dubbo自己扩展的filter在阿里云EDAS环境下未生效?
34176470 opened a new issue #225: dubbo自己扩展的filter在阿里云EDAS环境下未生效?
URL: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/225
自己根据dubbo的filter扩展方式,自己扩展了一个filter
在本机spring boot方式启动时,可以正常进入filter,并执行后续逻辑
在测试环境docker方式启动时,也可以正常进入filter,并执行后续逻辑
但在UAT环境,使用阿里云EDAS环境时,始终进入不了自己扩展的filter
请问这与EDAS环境有关吗?如何解决?
下面是代码:
```
@Activate(group = {Constants.PROVIDER, Constants.CONSUMER}, value = "tracing")
public final class TracingFilter implements Filter {
private static Logger logger = LoggerFactory.getLogger(TracingFilter.class);
Tracer tracer;
TraceContext.Extractor<Map<String, String>> extractor;
TraceContext.Injector<Map<String, String>> injector;
public void setTracing(Tracing tracing) {
tracer = tracing.tracer();
extractor = tracing.propagation().extractor(GETTER);
injector = tracing.propagation().injector(SETTER);
}
@Override
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
logger.info("Dubbo Parameters ==>> " + invoker.getUrl().getParameters());
logger.info("Interface ==>> " + buildSpanName(invoker, invocation));
if (tracer == null) {
logger.info("Tracer is null.");
return invoker.invoke(invocation);
}
//do something...
}
```



----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org