Open
Conversation
|
Hi @chenzhao11, welcome to SOFAStack community, Please sign Contributor License Agreement! After you signed CLA, we will automatically sync the status of this pull request in 3 minutes. |
|
Hi @chenzhao11, welcome to SOFAStack community, Please sign Contributor License Agreement! After you signed CLA, we will automatically sync the status of this pull request in 3 minutes. |
glmapper
requested changes
Aug 18, 2021
...er-plugin/src/main/java/com/alipay/sofa/tracer/plugins/jaeger/adapter/JaegerSpanAdapter.java
Outdated
Show resolved
Hide resolved
...er-plugin/src/main/java/com/alipay/sofa/tracer/plugins/jaeger/adapter/JaegerSpanAdapter.java
Outdated
Show resolved
Hide resolved
...er-plugin/src/main/java/com/alipay/sofa/tracer/plugins/jaeger/adapter/JaegerSpanAdapter.java
Outdated
Show resolved
Hide resolved
...tracer-jaeger-plugin/src/main/java/com/alipay/sofa/tracer/plugins/jaeger/utils/NetUtils.java
Show resolved
Hide resolved
Author
|
修改之前使用Http上传Zipkin JSONV2格式的数据部分,改为使用Jaeger中的HttpSender上报Jaeger.thrift格式的数据到Jaeger Collector中 修改后的配置项如下:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
支持上报span数据到Jaeger中进行展示
Modification:
1. 使用http方式发送zipkinV2 JSON格式的数据到Jaeger Collector中
Jaeger本身支持zipkinV2 JSON格式,所以新增配置类
JaegerSofaTracerAutoConfiguration解析配置文件属性com.alipay.sofa.tracer.jaeger.baseUrl,com.alipay.sofa.tracer.jaeger.enabled,com.alipay.sofa.tracer.jaeger.gzipped替换sofatrace的对应配置项,其余实现不变即可。2. 支持使用UDP发送Jaeger.thrift格式的数据到Jaeger Agent中,相关数据由Agent发送至Jaeger Collector
Agent是Jaeger中的重要模块,可以实现流量控制等功能,但是Agent只支持通过UDP发送的Thrift格式的数据,所以实现这个功能很有必要。
使用了
jaeger-client:1.6.0中的相关方法实现,使用其中的UdpSender发送span数据,工作主要是将SOFATracerSpan转换为JaegerSpan。新增配置类JaegerAgentSofaTracerAutoConfiguration。主要配置项:
com.alipay.sofa.tracer.jaeger.agent.hostcom.alipay.sofa.tracer.jaeger.agent.portcom.alipay.sofa.tracer.jaeger.agent.enablecom.alipay.sofa.tracer.jaeger.agent.maxPacketSizecom.alipay.sofa.tracer.jaeger.agent.flushIntervalcom.alipay.sofa.tracer.jaeger.agent.maxQueueSizecom.alipay.sofa.tracer.jaeger.agent.closeEnqueueTimeoutResult:
Fixes #372 .