-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support opentracing & demo #311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请确保tracer的唯一性、确定性和非空特性 : )
if (implementations.hasNext()) { | ||
tracer = implementations.next(); | ||
LoggerUtil.info("io.opentracing.Tracer load in DefaultTracerFactory, " + tracer.getClass().getSimpleName() | ||
+ " is used as default tracer."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该在此处判断,如果有超过一个实现,使用NoopTracer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改。
+ " is used as default tracer."); | ||
} | ||
} catch (Exception e) { | ||
LoggerUtil.warn("DefaultTracerFactory load Tracer fail.", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果发生任何异常,需要使用NoopTracer,确保tracer不能为空
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好像目前版本有CI失败? |
Travis CI有时会失败可能跟docker环境有关,mvn加载依赖类失败了,稍后我看一下 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改完版本后,我认为可以直接合并了。
@@ -21,6 +21,7 @@ | |||
<url>https://github.com/weibocom/motan</url> | |||
<properties> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<opentracing.version>0.20.2</opentracing.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.20.4应该是当前的release版本
非常感谢! |
你们相关的图标么?要求黑白的矢量图,https://github.com/opentracing/opentracing.io/blob/master/img/frameworks/django.svg 我可以准备把你们提交到opentracing.io上了。 如果没有图片,也可以用文字。 |
好的,我准备一下 |
support opentracing
实现方式:motan filter SPI。OpenTracingFilter中按OT 的api对server端和client端进行trace处理。
可用通过spirng 配置方式或api方式替换OpenTracingContext中的TracerFactory, 来实现不同tracer的替换。
demo在test classpath下的com.weibo.api.motan.filter.opentracing.zipkin.demo包下,其中server端使用spring配置方式替换具体trace实现,client端通过代码api替换。