parent
78189ff561
commit
3e334d08e9
|
|
@ -15,7 +15,8 @@
|
|||
<h2 class="project-tagline">Distributed Application Tracing System</h2>
|
||||
<a href="https://github.com/wu-sheng/sky-walking" class="btn">View on GitHub</a>
|
||||
<a href="https://github.com/wu-sheng/sky-walking/zipball/master" class="btn">Download .zip</a>
|
||||
<a href="sample-code/codeView.html" class="btn">View Samples</a>
|
||||
<a href="sample-code/uiView.html" class="btn">UI Preview</a>
|
||||
<a href="sample-code/codeView.html" class="btn">How to trace</a>
|
||||
</section>
|
||||
|
||||
<section class="main-content">
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
<section class="main-content">
|
||||
<h3>
|
||||
<a id="useInSpring" class="anchor" aria-hidden="true"><span class="octicon octicon-link"></span></a>如何追踪Spring本地方法调用?
|
||||
<a id="useInSpring" class="anchor" aria-hidden="true"><span class="octicon octicon-link"></span></a>如何追踪注册在Spring中类实例的本地方法调用?
|
||||
</h3>
|
||||
<p>1.在需要追踪的方法上,加上@Tracing标识</p>
|
||||
<p>1.在需要追踪的方法上,加上@Tracing标识。</p>
|
||||
<pre>
|
||||
public class TracingAspectBean {
|
||||
|
||||
|
|
@ -29,11 +29,56 @@ public class TracingAspectBean {
|
|||
return "Hello World";
|
||||
}
|
||||
}</pre>
|
||||
<p>2.Spring配置文件中,配置所需如下信息</p>
|
||||
<p>2.Spring配置文件中,配置所需如下信息。</p>
|
||||
<pre>
|
||||
<bean id="tracingEnhance" class="com.ai.cloud.skywalking.plugin.spring.TracingEnhanceProcessor"></pre>
|
||||
</section>
|
||||
|
||||
|
||||
<h3>
|
||||
<a id="useInDubbo" class="anchor" aria-hidden="true"><span class="octicon octicon-link"></span></a>如何追踪dubbo调用?
|
||||
</h3>
|
||||
<p>这里的dubbo,专指阿里发布的,已停止维护的标准dubbo版本(<a href='http://dubbo.io'>dubbo.io</a>)。扩展版本dubbox请参考相关章节。</p>
|
||||
<p>在客户端和服务端配置全局filter:swEnhanceFilter。</p>
|
||||
<pre>
|
||||
//客户端Spring配置文件
|
||||
<dubbo:consumer filter="swEnhanceFilter"/>
|
||||
|
||||
//服务端Spring配置文件
|
||||
<dubbo:provider filter="swEnhanceFilter"/></pre>
|
||||
|
||||
<h3>
|
||||
<a id="useInDubbox" class="anchor" aria-hidden="true"><span class="octicon octicon-link"></span></a>如何追踪dubbox 2.8.4 调用?
|
||||
</h3>
|
||||
<p>dubbox 2.8.4 较为符合dubbo的服务规范,这里指dubbox支持RpcContext中的attachment。追踪方式和dubbo相同。</p>
|
||||
<p>在客户端和服务端配置全局filter:swEnhanceFilter。</p>
|
||||
<pre>
|
||||
//客户端Spring配置文件
|
||||
<dubbo:consumer filter="swEnhanceFilter"/>
|
||||
|
||||
//服务端Spring配置文件
|
||||
<dubbo:provider filter="swEnhanceFilter"/></pre>
|
||||
|
||||
<h3>
|
||||
<a id="useInDubbox283" class="anchor" aria-hidden="true"><span class="octicon octicon-link"></span></a>如何追踪dubbox 2.8.3 以及之前的调用?
|
||||
</h3>
|
||||
<p>由于引入dubbox,主要目的是使用rest+json协议,所以以下方案都是在此种调用模式下的解决方案。其他协议未测试,请谅解,望大家提供测试结果与反馈。</p>
|
||||
<p>dubbox 2.8.3 以及之前版本不能正确的支持RpcContext中的attachment,存在BUG(2.8.4已修复)。采用扩展参数对象的方法支持追踪的传递性。</p>
|
||||
<p><span style="color:red">注意:依然推荐到升级dubbox 2.8.4</span></p>
|
||||
<p>1.在客户端和服务端配置全局filter:swEnhanceFilter。</p>
|
||||
<pre>
|
||||
//客户端Spring配置文件
|
||||
<dubbo:consumer filter="swEnhanceFilter"/>
|
||||
|
||||
//服务端Spring配置文件
|
||||
<dubbo:provider filter="swEnhanceFilter"/></pre>
|
||||
<p>2.在客户端和服务端启动时,开启dubbox 2.8.3之前版本的修复功能。在服务启动前调用如下代码,或将com.ai.cloud.skywalking.plugin.dubbox.bugfix.below283.BugFixAcitve注册到Spring中。</p>
|
||||
<pre>
|
||||
new com.ai.cloud.skywalking.plugin.dubbox.bugfix.below283.BugFixAcitve();</pre>
|
||||
|
||||
<p>3.dubbox调用参数包含javabean参数,并继承com.ai.cloud.skywalking.plugin.dubbox.bugfix.below283.SWBaseBean。<span style="color:red">只包含java基础类型(如:String、Integer等)的调用,无法支持追踪传递</span></p>
|
||||
|
||||
<p>4.客户端如果直接使用非dubbox客户端发起调用,需要在发送的参数中设置contextData。</p>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue