文档章节

Zipkin存储Sleuth信息实现调用链追踪的几种方法

o
 osc_zoa3moe9
发布于 2019/12/07 17:38
字数 25043
阅读 3
收藏 0

精选30+云产品,助力企业轻松上云!>>>

<div id="article_content" class="article_content clearfix"> <div class="article-copyright"> <span class="creativecommons"> <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> </a> <span> 版权声明:本文为博主原创文章,遵循<a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener"> CC 4.0 BY-SA </a>版权协议,转载请附上原文出处链接和本声明。 </span> <div class="article-source-link2222"> 本文链接:<a href="https://blog.csdn.net/alva_xu/article/details/84648249">https://blog.csdn.net/alva_xu/article/details/84648249</a> </div> </span>

            </div>
                                                <!--一个博主专栏付费入口-->
                      <!--一个博主专栏付费入口结束-->
        <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-833878f763.css">
                                    <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-833878f763.css">
            <div class="htmledit_views" id="content_views">
                                        <h2>一、基本概念</h2>

<p>大家知道,对于分布式应用系统,特别是微服务应用,服务之间的调用链跟踪是极其重要的。在Springcloud的微服务框架中提供了Springcloud Sleuth结合Zipkin的调用链跟踪方案,其理论基础主要来自于 Google 的一篇论文<a href="https://research.google.com/pubs/pub36356.html" rel="nofollow">《Dapper, a Large-Scale Distributed Systems Tracing Infrastructure》</a></p>

<p>Spring Cloud Sleuth为服务之间调用提供链路追踪。通过Sleuth可以很清楚的了解到一个服务请求经过了哪些服务,每个服务处理花费了多长。从而让我们可以很方便的理清各微服务间的调用关系。</p>

<p>Sleuth还可以帮助我们进行:</p>

<ul><li>耗时分析: 通过Sleuth可以很方便的了解到每个采样请求的耗时,从而分析出哪些服务调用比较耗时;</li> <li>可视化错误: 对于程序未捕捉的异常,可以通过集成Zipkin服务界面上看到;</li> <li>链路优化: 对于调用比较频繁的服务,可以针对这些服务实施一些优化措施。</li> </ul><p>&nbsp;</p>

<p>而zipkin可以收集Sleuth的采样数据,利用zipkin的存储来存储信息,利用zipkin ui来展示数据。根据其官方文档<a href="https://zipkin.io/pages/architecture.html?from=singlemessage&amp;isappinstalled=0" rel="nofollow">https://zipkin.io/pages/architecture.html?from=singlemessage&amp;isappinstalled=0</a>,其架构如下,</p>

<p><img alt="" class="has" height="504" src="https://img2018.cnblogs.com/blog/1112483/201912/1112483-20191207173902255-299009020.png" width="661"></p>

<p>其中四个组件的作用如下</p>

<h3 id="zipkin-collector">Zipkin Collector</h3>

<p>Once the trace data arrives at the Zipkin collector daemon, it is validated, stored, and indexed for lookups by the Zipkin collector.</p>

<h3 id="storage">Storage</h3>

<p>Zipkin was initially built to store data on Cassandra since Cassandra is scalable, has a flexible schema, and is heavily used within Twitter. However, we made this component pluggable. In addition to Cassandra, we natively support ElasticSearch and MySQL. Other back-ends might be offered as third party extensions.</p>

<h3 id="zipkin-query-service">Zipkin Query Service</h3>

<p>Once the data is stored and indexed, we need a way to extract it. The query daemon provides a simple JSON API for finding and retrieving traces. The primary consumer of this API is the Web UI.</p>

<h3 id="web-ui">Web UI</h3>

<p>We created a GUI that presents a nice interface for viewing traces. The web UI provides a method for viewing traces based on service, time, and annotations. Note: there is no built-in authentication in the UI!</p>

<p>其中最重要的collector的工作原理如下</p>

<pre class="has"><code class="hljs vbscript"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">───────┐ ┌───────────────────────┐ ┌─────────────┐ ┌──────────────────┐</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">│ User Code │ │ Trace Instrumentation │ │ Http Client │ │ Zipkin Collector │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">└─────────────┘ └───────────────────────┘ └─────────────┘ └──────────────────┘</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ┌─────────┐</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ ──┤<span class="hljs-keyword">GET</span> /foo ├─▶ │ ────┐ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> └─────────┘ │ record tags</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ ◀───┘ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ────┐</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ │ add trace headers │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ◀───┘</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ ────┐ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ record timestamp</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ ◀───┘ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ┌─────────────────┐</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ ──┤<span class="hljs-keyword">GET</span> /foo ├─▶ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │X-B3-TraceId: aa │ ────┐</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ │X-B3-SpanId: <span class="hljs-number">6</span>b │ │ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> └─────────────────┘ │ invoke</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ │ │ <span class="hljs-built_in">request</span> │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ │ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ┌────────┐ ◀───┘</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ ◀─────┤<span class="hljs-number">200</span> OK ├─────── │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ────┐ └────────┘</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="26"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ │ record duration │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="27"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ┌────────┐ ◀───┘</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="28"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ ◀──┤<span class="hljs-number">200</span> OK ├── │ │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="29"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> └────────┘ ┌────────────────────────────────┐</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="30"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │ ──┤ asynchronously report span ├────▶ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="31"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="32"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │{ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="33"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ <span class="hljs-string">"traceId"</span>: <span class="hljs-string">"aa"</span>, │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="34"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ <span class="hljs-string">"id"</span>: <span class="hljs-string">"6b"</span>, │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="35"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ <span class="hljs-string">"name"</span>: <span class="hljs-string">"get"</span>, │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="36"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ <span class="hljs-string">"timestamp"</span>: <span class="hljs-number">1483945573944000</span>,│</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="37"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ <span class="hljs-string">"duration"</span>: <span class="hljs-number">386000</span>, │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="38"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │ <span class="hljs-string">"annotations"</span>: [ │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="39"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> │--snip-- │</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="40"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> └────────────────────────────────┘</div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>本文通过示例来介绍Zipkin存储和展示Sleuth数据的几种方式</p>

<h2>二、示例环境介绍</h2>

<p>在搭建zipkin server前,我们先写了以下几个服务</p>

<p><img alt="" class="has" height="285" src="https://img2018.cnblogs.com/blog/1112483/201912/1112483-20191207173917713-34401929.png" width="1200"></p>

<p>1,<strong>SERVICE-HI</strong></p>

<p>通过访问http://localhost:8081/hi?name=aaa和http://localhost:8082/hi?name=aaa</p>

<p>返回 hi aaa,i am from port:8081 和hi aaa,i am from port:8082</p>

<p>2,<strong>SERVICE-RIBBON</strong></p>

<p>通过访问http://localhost:8010/ribbon?name=xuwh 来实现ribbon的load balance功能,依次调用SERVICE-HI 服务的8081和8082端口</p>

<p>3,<strong>SERVICE-FEIGN-HYSTRIX</strong></p>

<p>通过访问http://localhost:8020/feign?name=xuwh来实现feign的load balance功能,依次调用SERVICE-HI 服务的8081和8082端口</p>

<p>4,<strong>SERVICE-ZUUL</strong></p>

<p>通过访问http://localhost:8040/feign/feign?name=xuwh和http://localhost:8040/feign/feign?name=xuwh来实现Zuul的路由功能</p>

<p>服务之间的访问链路如下图</p>

<p><img alt="" class="has" height="143" src="https://img2018.cnblogs.com/blog/1112483/201912/1112483-20191207173930874-347475774.png" width="906"></p>

<h2>三、通过http调用直接在zipkin UI 上显示调用链的配置方法</h2>

<p>该方法实际上就是Collector直接通过http的方式收集信息,Zipkin UI读取collector的信息,并展示,信息不落地到数据库。需要改造Zipkin Client(即被监控服务)的配置和Zipkin Server的配置。</p>

<p><img alt="" class="has" height="309" src="https://img-blog.csdnimg.cn/20181203134404960.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="663"></p>

<p>1,Zipkin server服务</p>

<p>(1)zipkin-server服务源码</p>

<pre class="has"><code class="hljs java"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">package</span> jar;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">import</span> org.springframework.boot.SpringApplication;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">import</span> org.springframework.boot.autoconfigure.SpringBootApplication;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">import</span> org.springframework.cloud.netflix.eureka.EnableEurekaClient;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">import</span> zipkin.server.EnableZipkinServer;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-meta">@SpringBootApplication</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-meta">@EnableEurekaClient</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-meta">@EnableZipkinServer</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ZipkinServerApplication</span> </span>{</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> SpringApplication.run(ZipkinServerApplication.class, args);</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> }</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">}</div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(2)配置application.yml</p>

<pre class="has"><code class="hljs delphi"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">server:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> port: <span class="hljs-number">9411</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">spring:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> application:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">name</span>: zipkin-server</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">eureka:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> client:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> service-url:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> defaultZone: http:<span class="hljs-comment">//localhost:8761/eureka/</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(3)pom.xml 加依赖</p>

<pre class="has"><code class="hljs xml"><ol class="hljs-ln" style="width:976px"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="php"><span class="hljs-meta">&lt;?</span>xml version=<span class="hljs-string">"1.0"</span> encoding=<span class="hljs-string">"UTF-8"</span><span class="hljs-meta">?&gt;</span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag">&lt;<span class="hljs-name">project</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">"http://maven.apache.org/POM/4.0.0"</span> <span class="hljs-attr">xmlns:xsi</span>=<span class="hljs-string">"http://www.w3.org/2001/XMLSchema-instance"</span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-attr">xsi:schemaLocation</span>=<span class="hljs-string">"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"</span>&gt;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">modelVersion</span>&gt;</span>4.0.0<span class="hljs-tag">&lt;/<span class="hljs-name">modelVersion</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.svw<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>zipkin-server<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>0.0.1-SNAPSHOT<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">packaging</span>&gt;</span>jar<span class="hljs-tag">&lt;/<span class="hljs-name">packaging</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">name</span>&gt;</span>zipkin-server<span class="hljs-tag">&lt;/<span class="hljs-name">name</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">description</span>&gt;</span>Demo project for Spring Boot<span class="hljs-tag">&lt;/<span class="hljs-name">description</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">parent</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-parent<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.5.6.RELEASE<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">relativePath</span>/&gt;</span> <span class="hljs-comment">&lt;!-- lookup parent from repository --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">parent</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">properties</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">project.build.sourceEncoding</span>&gt;</span>UTF-8<span class="hljs-tag">&lt;/<span class="hljs-name">project.build.sourceEncoding</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">project.reporting.outputEncoding</span>&gt;</span>UTF-8<span class="hljs-tag">&lt;/<span class="hljs-name">project.reporting.outputEncoding</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">java.version</span>&gt;</span>1.8<span class="hljs-tag">&lt;/<span class="hljs-name">java.version</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">spring-cloud.version</span>&gt;</span>Dalston.SR3<span class="hljs-tag">&lt;/<span class="hljs-name">spring-cloud.version</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="26"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">properties</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="27"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="28"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependencies</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="29"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="30"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="31"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-eureka<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="32"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="33"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="34"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>io.zipkin.java<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="35"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>zipkin-server<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="36"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="37"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="38"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>io.zipkin.java<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="39"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>zipkin-autoconfigure-ui<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="40"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="41"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="42"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="43"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="44"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">scope</span>&gt;</span>test<span class="hljs-tag">&lt;/<span class="hljs-name">scope</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="45"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="46"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependencies</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="47"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="48"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependencyManagement</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="49"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependencies</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="50"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="51"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="52"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-dependencies<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="53"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>${spring-cloud.version}<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="54"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">type</span>&gt;</span>pom<span class="hljs-tag">&lt;/<span class="hljs-name">type</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="55"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">scope</span>&gt;</span>import<span class="hljs-tag">&lt;/<span class="hljs-name">scope</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="56"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="57"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependencies</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="58"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependencyManagement</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="59"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="60"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">build</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="61"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">plugins</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="62"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">plugin</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="63"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="64"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-maven-plugin<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="65"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">plugin</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="66"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">plugins</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="67"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">build</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="68"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="69"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="70"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag">&lt;/<span class="hljs-name">project</span>&gt;</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>这里最重要的是引入zipkin-server依赖,以及zipkin-autoconfigure-ui依赖</p>

<pre class="has"><code class="hljs xml"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>io.zipkin.java<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>zipkin-server<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>io.zipkin.java<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>zipkin-autoconfigure-ui<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>2,要跟踪链路的服务的改造(4个服务都要改)</p>

<p>(1)改配置</p>

<p>以SERVICE-ZUUL 为例</p>

<pre class="has"><code class="hljs bash"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">server:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> port: 8040</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">spring:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> application:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> name: service-zuul</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> zipkin:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> base-url: http://localhost:9411</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> sleuth:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> sampler:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> percentage: 1.0</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">eureka:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> client:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> service-url:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> defaultZone: http://localhost:8761/eureka/</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">zuul:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> routes:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> user-route1: <span class="hljs-comment"># 该配置方式中,user-route只是给路由一个名称,可以任意起名。</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> service-id: SERVICE-FEIGN-HYSTRIX</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> path: /feign/** <span class="hljs-comment"># service-id对应的路径</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> user-route2: <span class="hljs-comment"># 该配置方式中,user-route只是给路由一个名称,可以任意起名。</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> service-id: SERVICE-RIBBON</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> path: /ribbon/** <span class="hljs-comment"># service-id对应的路径</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">security:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> basic:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> enabled: <span class="hljs-literal">true</span> <span class="hljs-comment"># 开启基于HTTP basic的认证</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="26"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> user:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="27"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> name: xuwh <span class="hljs-comment"># 配置登录的账号是user</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="28"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> password: password123 <span class="hljs-comment"># 配置登录的密码是password123</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>在application.yml中增加了这几行配置</p>

<pre class="has"><code class="hljs cs"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> zipkin:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">base</span>-url: http:<span class="hljs-comment">//localhost:9411</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> sleuth:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> sampler:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> percentage: <span class="hljs-number">1.0</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(2)加依赖</p>

<p>在pom.xml中增加以下依赖</p>

<pre class="has"><code class="hljs xml"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-zipkin<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>3,启动各个服务,</p>

<p><img alt="" class="has" height="284" src="https://img-blog.csdnimg.cn/20181130145444920.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="762"></p>

<p>4,并对各个服务进行web访问操作,在调试中发现,由于增加了系统采样,SERVICE-ZUUL在调用其他服务的时候,由于超时,而我们又没定义超时熔断服务,所以会调用不成功,console报错如下</p>

<pre class="has"><code class="hljs vbscript"><ol class="hljs-ln hundred" style="width:1968px"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">com.netflix.zuul.exception.ZuulException: Forwarding <span class="hljs-keyword">error</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException(RibbonRoutingFilter.java:<span class="hljs-number">188</span>) ~[spring-cloud-netflix-core<span class="hljs-number">-1.3</span><span class="hljs-number">.4</span>.RELEASE.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.4</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:<span class="hljs-number">163</span>) ~[spring-cloud-netflix-core<span class="hljs-number">-1.3</span><span class="hljs-number">.4</span>.RELEASE.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.4</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:<span class="hljs-number">111</span>) ~[spring-cloud-netflix-core<span class="hljs-number">-1.3</span><span class="hljs-number">.4</span>.RELEASE.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.4</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:<span class="hljs-number">112</span>) ~[zuul-core<span class="hljs-number">-1.3</span><span class="hljs-number">.0</span>.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.0</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:<span class="hljs-number">193</span>) ~[zuul-core<span class="hljs-number">-1.3</span><span class="hljs-number">.0</span>.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.0</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:<span class="hljs-number">157</span>) ~[zuul-core<span class="hljs-number">-1.3</span><span class="hljs-number">.0</span>.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.0</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.zuul.FilterProcessor.route(FilterProcessor.java:<span class="hljs-number">118</span>) ~[zuul-core<span class="hljs-number">-1.3</span><span class="hljs-number">.0</span>.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.0</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.zuul.ZuulRunner.route(ZuulRunner.java:<span class="hljs-number">96</span>) ~[zuul-core<span class="hljs-number">-1.3</span><span class="hljs-number">.0</span>.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.0</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.zuul.http.ZuulServlet.route(ZuulServlet.java:<span class="hljs-number">116</span>) ~[zuul-core<span class="hljs-number">-1.3</span><span class="hljs-number">.0</span>.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.0</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:<span class="hljs-number">81</span>) ~[zuul-core<span class="hljs-number">-1.3</span><span class="hljs-number">.0</span>.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.0</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:<span class="hljs-number">157</span>) [spring-webmvc<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:<span class="hljs-number">44</span>) [spring-cloud-netflix-core<span class="hljs-number">-1.3</span><span class="hljs-number">.4</span>.RELEASE.jar:<span class="hljs-number">1.3</span><span class="hljs-number">.4</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:<span class="hljs-number">50</span>) [spring-webmvc<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:<span class="hljs-number">967</span>) [spring-webmvc<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:<span class="hljs-number">901</span>) [spring-webmvc<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:<span class="hljs-number">970</span>) [spring-webmvc<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:<span class="hljs-number">861</span>) [spring-webmvc<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at javax.servlet.http.HttpServlet.service(HttpServlet.java:<span class="hljs-number">635</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:<span class="hljs-number">846</span>) [spring-webmvc<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at javax.servlet.http.HttpServlet.service(HttpServlet.java:<span class="hljs-number">742</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">231</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.tomcat.websocket.<span class="hljs-built_in">server</span>.WsFilter.doFilter(WsFilter.java:<span class="hljs-number">52</span>) [tomcat-embed-websocket<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="26"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="27"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="28"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.boot.web.<span class="hljs-built_in">filter</span>.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:<span class="hljs-number">55</span>) [spring-boot<span class="hljs-number">-1.5</span><span class="hljs-number">.6</span>.RELEASE.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.6</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="29"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="30"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="31"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="32"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:<span class="hljs-number">110</span>) [spring-boot-actuator<span class="hljs-number">-1.5</span><span class="hljs-number">.6</span>.RELEASE.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.6</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="33"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="34"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="35"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="36"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">317</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="37"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:<span class="hljs-number">127</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="38"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:<span class="hljs-number">91</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="39"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="40"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:<span class="hljs-number">114</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="41"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="42"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:<span class="hljs-number">137</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="43"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="44"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:<span class="hljs-number">111</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="45"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="46"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:<span class="hljs-number">170</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="47"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="48"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:<span class="hljs-number">63</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="49"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="50"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:<span class="hljs-number">215</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="51"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="52"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="53"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:<span class="hljs-number">116</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="54"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="55"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:<span class="hljs-number">64</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="56"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="57"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="58"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:<span class="hljs-number">105</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="59"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="60"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.context.<span class="hljs-built_in">request</span>.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:<span class="hljs-number">56</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="61"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="62"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:<span class="hljs-number">331</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="63"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:<span class="hljs-number">214</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="64"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:<span class="hljs-number">177</span>) [spring-security-web<span class="hljs-number">-4.2</span><span class="hljs-number">.3</span>.RELEASE.jar:<span class="hljs-number">4.2</span><span class="hljs-number">.3</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="65"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:<span class="hljs-number">346</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="66"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:<span class="hljs-number">262</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="67"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="68"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="69"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.RequestContextFilter.doFilterInternal(RequestContextFilter.java:<span class="hljs-number">99</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="70"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="71"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="72"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="73"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:<span class="hljs-number">105</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="74"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="75"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="76"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="77"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:<span class="hljs-number">81</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="78"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="79"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="80"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="81"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.cloud.sleuth.instrument.web.TraceFilter.doFilter(TraceFilter.java:<span class="hljs-number">169</span>) [spring-cloud-sleuth-core<span class="hljs-number">-1.2</span><span class="hljs-number">.4</span>.RELEASE.jar:<span class="hljs-number">1.2</span><span class="hljs-number">.4</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="82"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="83"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="84"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:<span class="hljs-number">197</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="85"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="86"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="87"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="88"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:<span class="hljs-number">106</span>) [spring-boot-actuator<span class="hljs-number">-1.5</span><span class="hljs-number">.6</span>.RELEASE.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.6</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="89"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.web.<span class="hljs-built_in">filter</span>.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:<span class="hljs-number">107</span>) [spring-web<span class="hljs-number">-4.3</span><span class="hljs-number">.10</span>.RELEASE.jar:<span class="hljs-number">4.3</span><span class="hljs-number">.10</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="90"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:<span class="hljs-number">193</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="91"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:<span class="hljs-number">166</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="92"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:<span class="hljs-number">198</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="93"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:<span class="hljs-number">96</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="94"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:<span class="hljs-number">478</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="95"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:<span class="hljs-number">140</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="96"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:<span class="hljs-number">80</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="97"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:<span class="hljs-number">87</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="98"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:<span class="hljs-number">342</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="99"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:<span class="hljs-number">799</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="100"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:<span class="hljs-number">66</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="101"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:<span class="hljs-number">868</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="102"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:<span class="hljs-number">1455</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="103"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:<span class="hljs-number">49</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="104"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:<span class="hljs-number">1142</span>) [na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="105"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:<span class="hljs-number">617</span>) [na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="106"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:<span class="hljs-number">61</span>) [tomcat-embed-core<span class="hljs-number">-8.5</span><span class="hljs-number">.16</span>.jar:<span class="hljs-number">8.5</span><span class="hljs-number">.16</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="107"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.lang.Thread.run(Thread.java:<span class="hljs-number">748</span>) [na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="108"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: SERVICE-FEIGN-HYSTRIX timed-out <span class="hljs-keyword">and</span> no fallback available.</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="109"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand$<span class="hljs-number">22.</span><span class="hljs-keyword">call</span>(AbstractCommand.java:<span class="hljs-number">819</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="110"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand$<span class="hljs-number">22.</span><span class="hljs-keyword">call</span>(AbstractCommand.java:<span class="hljs-number">804</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="111"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$<span class="hljs-number">4.</span>onError(OperatorOnErrorResumeNextViaFunction.java:<span class="hljs-number">140</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="112"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:<span class="hljs-number">87</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="113"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:<span class="hljs-number">87</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="114"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand$DeprecatedOnFallbackHookApplication$<span class="hljs-number">1.</span>onError(AbstractCommand.java:<span class="hljs-number">1472</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="115"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand$FallbackHookApplication$<span class="hljs-number">1.</span>onError(AbstractCommand.java:<span class="hljs-number">1397</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="116"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:<span class="hljs-number">87</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="117"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.observers.Subscribers$<span class="hljs-number">5.</span>onError(Subscribers.java:<span class="hljs-number">230</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="118"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeThrow.<span class="hljs-keyword">call</span>(OnSubscribeThrow.java:<span class="hljs-number">44</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="119"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeThrow.<span class="hljs-keyword">call</span>(OnSubscribeThrow.java:<span class="hljs-number">28</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="120"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.Observable.unsafeSubscribe(Observable.java:<span class="hljs-number">10211</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="121"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDefer.<span class="hljs-keyword">call</span>(OnSubscribeDefer.java:<span class="hljs-number">51</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="122"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDefer.<span class="hljs-keyword">call</span>(OnSubscribeDefer.java:<span class="hljs-number">35</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="123"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.Observable.unsafeSubscribe(Observable.java:<span class="hljs-number">10211</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="124"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach.<span class="hljs-keyword">call</span>(OnSubscribeDoOnEach.java:<span class="hljs-number">41</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="125"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach.<span class="hljs-keyword">call</span>(OnSubscribeDoOnEach.java:<span class="hljs-number">30</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="126"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeLift.<span class="hljs-keyword">call</span>(OnSubscribeLift.java:<span class="hljs-number">48</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="127"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeLift.<span class="hljs-keyword">call</span>(OnSubscribeLift.java:<span class="hljs-number">30</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="128"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeLift.<span class="hljs-keyword">call</span>(OnSubscribeLift.java:<span class="hljs-number">48</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="129"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeLift.<span class="hljs-keyword">call</span>(OnSubscribeLift.java:<span class="hljs-number">30</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="130"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.Observable.unsafeSubscribe(Observable.java:<span class="hljs-number">10211</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="131"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach.<span class="hljs-keyword">call</span>(OnSubscribeDoOnEach.java:<span class="hljs-number">41</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="132"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach.<span class="hljs-keyword">call</span>(OnSubscribeDoOnEach.java:<span class="hljs-number">30</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="133"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.Observable.unsafeSubscribe(Observable.java:<span class="hljs-number">10211</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="134"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach.<span class="hljs-keyword">call</span>(OnSubscribeDoOnEach.java:<span class="hljs-number">41</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="135"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach.<span class="hljs-keyword">call</span>(OnSubscribeDoOnEach.java:<span class="hljs-number">30</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="136"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeLift.<span class="hljs-keyword">call</span>(OnSubscribeLift.java:<span class="hljs-number">48</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="137"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeLift.<span class="hljs-keyword">call</span>(OnSubscribeLift.java:<span class="hljs-number">30</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="138"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.Observable.unsafeSubscribe(Observable.java:<span class="hljs-number">10211</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="139"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach.<span class="hljs-keyword">call</span>(OnSubscribeDoOnEach.java:<span class="hljs-number">41</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="140"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach.<span class="hljs-keyword">call</span>(OnSubscribeDoOnEach.java:<span class="hljs-number">30</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="141"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeLift.<span class="hljs-keyword">call</span>(OnSubscribeLift.java:<span class="hljs-number">48</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="142"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeLift.<span class="hljs-keyword">call</span>(OnSubscribeLift.java:<span class="hljs-number">30</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="143"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.Observable.unsafeSubscribe(Observable.java:<span class="hljs-number">10211</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="144"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$<span class="hljs-number">4.</span>onError(OperatorOnErrorResumeNextViaFunction.java:<span class="hljs-number">142</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="145"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:<span class="hljs-number">87</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="146"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:<span class="hljs-number">87</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="147"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand$HystrixObservableTimeoutOperator$<span class="hljs-number">1</span>$<span class="hljs-number">1.</span>run(AbstractCommand.java:<span class="hljs-number">1154</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="148"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.strategy.concurrency.HystrixContextRunnable$<span class="hljs-number">1.</span><span class="hljs-keyword">call</span>(HystrixContextRunnable.java:<span class="hljs-number">45</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="149"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.strategy.concurrency.HystrixContextRunnable$<span class="hljs-number">1.</span><span class="hljs-keyword">call</span>(HystrixContextRunnable.java:<span class="hljs-number">41</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="150"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at org.springframework.cloud.sleuth.instrument.hystrix.SleuthHystrixConcurrencyStrategy$HystrixTraceCallable.<span class="hljs-keyword">call</span>(SleuthHystrixConcurrencyStrategy.java:<span class="hljs-number">188</span>) ~[spring-cloud-sleuth-core<span class="hljs-number">-1.2</span><span class="hljs-number">.4</span>.RELEASE.jar:<span class="hljs-number">1.2</span><span class="hljs-number">.4</span>.RELEASE]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="151"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.strategy.concurrency.HystrixContextRunnable.run(HystrixContextRunnable.java:<span class="hljs-number">61</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="152"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand$HystrixObservableTimeoutOperator$<span class="hljs-number">1.</span>tick(AbstractCommand.java:<span class="hljs-number">1159</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="153"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.util.HystrixTimer$<span class="hljs-number">1.</span>run(HystrixTimer.java:<span class="hljs-number">99</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="154"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.util.concurrent.Executors$RunnableAdapter.<span class="hljs-keyword">call</span>(Executors.java:<span class="hljs-number">511</span>) ~[na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="155"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:<span class="hljs-number">308</span>) ~[na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="156"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$<span class="hljs-number">301</span>(ScheduledThreadPoolExecutor.java:<span class="hljs-number">180</span>) ~[na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="157"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:<span class="hljs-number">294</span>) ~[na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="158"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:<span class="hljs-number">1142</span>) [na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="159"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:<span class="hljs-number">617</span>) [na:<span class="hljs-number">1.8</span><span class="hljs-number">.0</span>_131]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="160"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ... <span class="hljs-number">1</span> common frames omitted</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="161"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Caused by: java.util.concurrent.TimeoutException: <span class="hljs-literal">null</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="162"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand.handleTimeoutViaFallback(AbstractCommand.java:<span class="hljs-number">997</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="163"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand.access$<span class="hljs-number">500</span>(AbstractCommand.java:<span class="hljs-number">60</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="164"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand$<span class="hljs-number">12.</span><span class="hljs-keyword">call</span>(AbstractCommand.java:<span class="hljs-number">610</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="165"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at com.netflix.hystrix.AbstractCommand$<span class="hljs-number">12.</span><span class="hljs-keyword">call</span>(AbstractCommand.java:<span class="hljs-number">601</span>) ~[hystrix-core<span class="hljs-number">-1.5</span><span class="hljs-number">.12</span>.jar:<span class="hljs-number">1.5</span><span class="hljs-number">.12</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="166"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$<span class="hljs-number">4.</span>onError(OperatorOnErrorResumeNextViaFunction.java:<span class="hljs-number">140</span>) ~[rxjava<span class="hljs-number">-1.1</span><span class="hljs-number">.10</span>.jar:<span class="hljs-number">1.1</span><span class="hljs-number">.10</span>]</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="167"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ... <span class="hljs-number">16</span> common frames omitted</div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>故需要在SERVICE-ZUUL 的配置文件application.yml中增加hystrix的超时设置,</p>

<pre class="has"><code class="hljs java"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">hystrix: </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> command: </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">default</span>: </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> execution: </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> isolation: </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> thread: </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> timeoutInMilliseconds: <span class="hljs-number">60000</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>同样,对<strong>SERVICE-FEIGN-HYSTRIX</strong>的配置文件application.yml中也增加hystrix的超时设置</p>

<p>5,现在可以对各个服务进行web访问操作了,多次操作,把采样数据送给Zipkin server</p>

<p>6,输入http://localhost:9411/zipkin,打开Zipkin UI</p>

<p><img alt="" class="has" height="400" src="https://img-blog.csdnimg.cn/2018113016041131.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="736"></p>

<p>点击左边红色圈的下拉框,可以列出我们跟踪的4个服务,调整Start time和End time ,再点击Find Traces 可以得到该服务的调用链数据,具体含义在此不做解释了,可以看到,每个服务调用的时长超过了一秒,印证了前面所说要加长服务超时设置。</p>

<p><img alt="" class="has" height="473" src="https://img-blog.csdnimg.cn/20181130160806922.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="692"></p>

<p>点击右上角Dependencies 按钮,可以看到完整的调用链视图</p>

<p><img alt="" class="has" height="255" src="https://img-blog.csdnimg.cn/2018113016112588.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="680"></p>

<p>还可以看到更多的信息</p>

<p><img alt="" class="has" height="571" src="https://img-blog.csdnimg.cn/20181130162628732.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="499"></p>

<h2>四、通过RabbitMQ传输数据在zipkin UI 上显示调用链的配置方法</h2>

<p>该方法实际上就是Collector直接通过RabbitMQ的方式收集信息,Zipkin UI读取collector的信息,并展示,信息不落地到数据库。需要改造Zipkin Client(即被监控服务)的配置和Zipkin Server的配置。</p>

<p><img alt="" class="has" height="299" src="https://img-blog.csdnimg.cn/20181203134943800.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="720"></p>

<p>&nbsp;</p>

<p>以下介绍用rabbitMQ传输数据给zipkin server的方式</p>

<p>1,安装RabbitMQ</p>

<p>这个很简单,参考官方文档安装即可。本人在localhost 的win7上装了一个rabbitmq。并在后台以服务方式运行着。我们需要知道它的端口(默认为5672)、用户名和口令。通过浏览<a href="http://localhost:15672/" rel="nofollow">http://localhost:15672/ </a>浏览可以对RabbitMQ进行管理(默认口令guest/guest)</p>

<p><img alt="" class="has" height="537" src="https://img-blog.csdnimg.cn/20181130164647480.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="544"></p>

<p><img alt="" class="has" height="293" src="https://img-blog.csdnimg.cn/20181130165444387.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="584"></p>

<p><img alt="" class="has" height="374" src="https://img-blog.csdnimg.cn/20181130165636980.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="511"></p>

<p>2,改造zipkin-server</p>

<p>(1)改依赖,在pom.xml中去掉zipkin-server依赖,加上spring-cloud-sleuth-zipkin-stream和spring-cloud-starter-stream-rabbit依赖</p>

<pre class="has"><code class="hljs xml"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;dependency&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;groupId&gt;io.zipkin.java&lt;/groupId&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;artifactId&gt;zipkin-server&lt;/artifactId&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;/dependency&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>io.zipkin.java<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>zipkin-autoconfigure-ui<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-sleuth-zipkin-stream<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-stream-rabbit<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(2)改配置,在application.yml中加上RabbitMQ的配置</p>

<pre class="has"><code class="hljs vbscript"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">spring:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> application:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> name: zipkin-<span class="hljs-built_in">server</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> rabbitmq:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> host: localhost</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> port: <span class="hljs-number">5672</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> username: guest</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> password: guest</div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(3)改代码,在主程序ZipkinServerApplication上加@EnableZipkinStreamServer注解,开启ZipkinStreamServer</p>

<pre class="has"><code class="hljs java"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">//@EnableZipkinServer</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-meta">@EnableZipkinStreamServer</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>3,改造zipkin Client,对4个服务做以下的操作</p>

<p>(1)改依赖,在pom.xml中将spring-cloud-starter-zipkin改为spring-cloud-sleuth-zipkin-stream和spring-cloud-starter-stream-rabbit</p>

<pre class="has"><code class="hljs xml"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;dependency&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;artifactId&gt;spring-cloud-starter-zipkin&lt;/artifactId&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;/dependency&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-sleuth-zipkin-stream<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-stream-rabbit<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(2)改配置,在application.yml中加上RabbitMQ的配置</p>

<pre class="has"><code class="hljs delphi"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">spring:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> application:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">name</span>: service-feign-hystrix</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> zipkin:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> base-url: http:<span class="hljs-comment">//localhost:9411</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> rabbitmq:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> host: localhost</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> port: <span class="hljs-number">5672</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> username: guest</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> password: guest</div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(3)代码不用改</p>

<p>4,重启各个服务,并进行访问操作</p>

<p>5,登录RabbitMQ管理界面,可以看到,有数据传输</p>

<p><img alt="" class="has" height="480" src="https://img-blog.csdnimg.cn/20181130173312488.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="583"></p>

<p>6,打开Zipkin-UI ,同样可以看到有数据显示</p>

<p><img alt="" class="has" height="378" src="https://img-blog.csdnimg.cn/201811301734312.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="622"></p>

<h2>五、将数据通过rabbitMQ写入Mysql再在zipkin UI 上显示调用链的配置方法</h2>

<p>Zipkin支持Mysql、Elasticsearch、Cassandra等数据库存储,其实现方式很简单,就是把Zip server的存储方式改为相应的数据库存储方式,将原来rabbitMQ传到collector的数据存入相应的数据库,Zipkin UI 读取数据库的数据再展示,目的是让数据持久化。其架构图如图所示。</p>

<p><img alt="" class="has" height="299" src="https://img-blog.csdnimg.cn/20181203135331887.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="720"></p>

<p>本章节介绍数据存入MYSQL的方法。</p>

<p>Zipkin client无需做任何更改,只需配好Mysql数据库和zipkin server即可</p>

<p>1,安装配置mysql,建数据库表,存储sleuth数据</p>

<p>具体如何安装配置mysql,在此不再赘述。我的数据库直接安装在本机。</p>

<p>在Mysql创建数据库`spring_cloud_zipkin`,连接数据库,创建相应对象以存储Sleuth信息。源码参见<a href="https://github.com/openzipkin/zipkin/blob/master/zipkin-storage/mysql/src/main/resources/mysql.sql" rel="nofollow">https://github.com/openzipkin/zipkin/blob/master/zipkin-storage/mysql/src/main/resources/mysql.sql</a></p>

<pre class="has"><code class="hljs sql"><ol class="hljs-ln" style="width:1313px"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span> <span class="hljs-keyword">IF</span> <span class="hljs-keyword">NOT</span> <span class="hljs-keyword">EXISTS</span> zipkin_spans (</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`trace_id_high`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-number">0</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'If non zero, this means the trace uses 128 bit traceIds instead of 64 bit'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`trace_id`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`id`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`name`</span> <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">255</span>) <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`parent_id`</span> <span class="hljs-built_in">BIGINT</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`debug`</span> <span class="hljs-built_in">BIT</span>(<span class="hljs-number">1</span>),</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`start_ts`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'Span.timestamp(): epoch micros used for endTs query and to implement TTL'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`duration`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'Span.duration(): micros used for minDuration and maxDuration query'</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">) <span class="hljs-keyword">ENGINE</span>=<span class="hljs-keyword">InnoDB</span> ROW_FORMAT=COMPRESSED <span class="hljs-built_in">CHARACTER</span> <span class="hljs-keyword">SET</span>=utf8 <span class="hljs-keyword">COLLATE</span> utf8_general_ci;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_spans <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">UNIQUE</span> <span class="hljs-keyword">KEY</span>(<span class="hljs-string">`trace_id_high`</span>, <span class="hljs-string">`trace_id`</span>, <span class="hljs-string">`id`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'ignore insert on duplicate'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_spans <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`trace_id_high`</span>, <span class="hljs-string">`trace_id`</span>, <span class="hljs-string">`id`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for joining with zipkin_annotations'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_spans <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`trace_id_high`</span>, <span class="hljs-string">`trace_id`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for getTracesByIds'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_spans <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`name`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for getTraces and getSpanNames'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_spans <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`start_ts`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for getTraces ordering and range'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span> <span class="hljs-keyword">IF</span> <span class="hljs-keyword">NOT</span> <span class="hljs-keyword">EXISTS</span> zipkin_annotations (</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`trace_id_high`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-number">0</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'If non zero, this means the trace uses 128 bit traceIds instead of 64 bit'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`trace_id`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'coincides with zipkin_spans.trace_id'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`span_id`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'coincides with zipkin_spans.id'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`a_key`</span> <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">255</span>) <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'BinaryAnnotation.key or Annotation.value if type == -1'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`a_value`</span> <span class="hljs-built_in">BLOB</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'BinaryAnnotation.value(), which must be smaller than 64KB'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`a_type`</span> <span class="hljs-built_in">INT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'BinaryAnnotation.type() or -1 if Annotation'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`a_timestamp`</span> <span class="hljs-built_in">BIGINT</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'Used to implement TTL; Annotation.timestamp or zipkin_spans.timestamp'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="26"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`endpoint_ipv4`</span> <span class="hljs-built_in">INT</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'Null when Binary/Annotation.endpoint is null'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="27"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`endpoint_ipv6`</span> <span class="hljs-built_in">BINARY</span>(<span class="hljs-number">16</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'Null when Binary/Annotation.endpoint is null, or no IPv6 address'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="28"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`endpoint_port`</span> <span class="hljs-built_in">SMALLINT</span> <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'Null when Binary/Annotation.endpoint is null'</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="29"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`endpoint_service_name`</span> <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">255</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'Null when Binary/Annotation.endpoint is null'</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="30"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">) <span class="hljs-keyword">ENGINE</span>=<span class="hljs-keyword">InnoDB</span> ROW_FORMAT=COMPRESSED <span class="hljs-built_in">CHARACTER</span> <span class="hljs-keyword">SET</span>=utf8 <span class="hljs-keyword">COLLATE</span> utf8_general_ci;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="31"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="32"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_annotations <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">UNIQUE</span> <span class="hljs-keyword">KEY</span>(<span class="hljs-string">`trace_id_high`</span>, <span class="hljs-string">`trace_id`</span>, <span class="hljs-string">`span_id`</span>, <span class="hljs-string">`a_key`</span>, <span class="hljs-string">`a_timestamp`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'Ignore insert on duplicate'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="33"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_annotations <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`trace_id_high`</span>, <span class="hljs-string">`trace_id`</span>, <span class="hljs-string">`span_id`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for joining with zipkin_spans'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="34"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_annotations <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`trace_id_high`</span>, <span class="hljs-string">`trace_id`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for getTraces/ByIds'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="35"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_annotations <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`endpoint_service_name`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for getTraces and getServiceNames'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="36"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_annotations <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`a_type`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for getTraces'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="37"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_annotations <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`a_key`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for getTraces'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="38"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_annotations <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span>(<span class="hljs-string">`trace_id`</span>, <span class="hljs-string">`span_id`</span>, <span class="hljs-string">`a_key`</span>) <span class="hljs-keyword">COMMENT</span> <span class="hljs-string">'for dependencies job'</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="39"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="40"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span> <span class="hljs-keyword">IF</span> <span class="hljs-keyword">NOT</span> <span class="hljs-keyword">EXISTS</span> zipkin_dependencies (</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="41"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`day`</span> <span class="hljs-built_in">DATE</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="42"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`parent`</span> <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">255</span>) <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="43"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`child`</span> <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">255</span>) <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="44"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`call_count`</span> <span class="hljs-built_in">BIGINT</span>,</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="45"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-string">`error_count`</span> <span class="hljs-built_in">BIGINT</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="46"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">) <span class="hljs-keyword">ENGINE</span>=<span class="hljs-keyword">InnoDB</span> ROW_FORMAT=COMPRESSED <span class="hljs-built_in">CHARACTER</span> <span class="hljs-keyword">SET</span>=utf8 <span class="hljs-keyword">COLLATE</span> utf8_general_ci;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="47"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="48"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> zipkin_dependencies <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">UNIQUE</span> <span class="hljs-keyword">KEY</span>(<span class="hljs-string">`day`</span>, <span class="hljs-string">`parent`</span>, <span class="hljs-string">`child`</span>);</div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>结果如下</p>

<pre class="has"><code class="hljs ruby"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-symbol">C:</span>\Users\<span class="hljs-number">91678</span>&gt;mysql -u root -p spring_cloud_zipkin</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Enter <span class="hljs-symbol">password:</span> ******</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Welcome to the MySQL monitor. Commands <span class="hljs-keyword">end</span> with ; <span class="hljs-keyword">or</span> \g.</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Your MySQL connection id is <span class="hljs-number">7</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Server <span class="hljs-symbol">version:</span> <span class="hljs-number">5.7</span>.<span class="hljs-number">19</span> MySQL Community Server (GPL)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Copyright (c) <span class="hljs-number">2000</span>, <span class="hljs-number">2015</span>, Oracle <span class="hljs-keyword">and</span>/<span class="hljs-keyword">or</span> its affiliates. All rights reserved.</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Oracle is a registered trademark of Oracle Corporation <span class="hljs-keyword">and</span>/<span class="hljs-keyword">or</span> its</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">affiliates. Other names may be trademarks of their respective</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">owners.</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">Type <span class="hljs-string">'help;'</span> <span class="hljs-keyword">or</span> <span class="hljs-string">'\h'</span> <span class="hljs-keyword">for</span> help. Type <span class="hljs-string">'\c'</span> to clear the current input statement.</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">mysql&gt; show tables;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">+-------------------------------+</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-params">| Tables_in_spring_cloud_zipkin |</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">+-------------------------------+</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-params">| zipkin_annotations |</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-params">| zipkin_dependencies |</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-params">| zipkin_spans |</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">+-------------------------------+</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-number">3</span> rows <span class="hljs-keyword">in</span> set (<span class="hljs-number">0</span>.<span class="hljs-number">00</span> sec)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">mysql&gt;</div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>2,改造Zipkin server</p>

<p>(1)加依赖,在POM.XML增加mysql JDBC相关依赖</p>

<pre class="has"><code class="hljs xml"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>mysql<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>mysql-connector-java<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-jdbc<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(2)改配置,增加了DataSource配置和zipkin的storage配置</p>

<pre class="has"><code class="hljs delphi"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">server:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> port: <span class="hljs-number">9411</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">spring:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> application:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">name</span>: zipkin-server</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> rabbitmq:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> host: localhost</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> port: <span class="hljs-number">5672</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> username: guest</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> password: guest</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> datasource:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> url: jdbc:mysql:<span class="hljs-comment">//localhost:3306/spring_cloud_zipkin</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> username: root</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> password: abc123</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> driver-<span class="hljs-keyword">class</span>-<span class="hljs-keyword">name</span>: com.mysql.jdbc.Driver</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">zipkin:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> storage:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">type</span>: mysql</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">eureka:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> client:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> service-url:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> defaultZone: http:<span class="hljs-comment">//localhost:8761/eureka/</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(3)代码不用改</p>

<p>3,重启各个服务,并进行访问操作</p>

<p>4,登录RabbitMQ管理界面,可以看到,有数据传输</p>

<p><img alt="" class="has" height="231" src="https://img-blog.csdnimg.cn/20181203124832643.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="532"></p>

<p>5,查看mysql数据库,可以看到有新的Sleuth信息被存储进去</p>

<p><img alt="" class="has" height="198" src="https://img-blog.csdnimg.cn/20181203124941987.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="672"></p>

<p>6,打开Zipkin-UI ,同样可以看到有数据显示</p>

<p><img alt="" class="has" height="482" src="https://img-blog.csdnimg.cn/20181203131148231.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="1185"></p>

<p><img alt="" class="has" height="217" src="https://img-blog.csdnimg.cn/20181203125019152.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="730"></p>

<h2>六、将数据通过rabbitMQ写入ElasticSearch再在zipkin UI 上显示调用链的配置方法</h2>

<p>如第五章所言,Zipkin支持Mysql、Elasticsearch、Cassandra等数据库存储。以下是将rabbitMQ传到collector的数据存入ElasticSearch数据库,Zipkin UI 读取数据库的数据再展示。架构图同第五章。</p>

<p>修改第五章的相应配置,步骤如下</p>

<p>1,安装配置ElasticSearch,存储sleuth数据。安装方法参见本人博客<a href="https://blog.csdn.net/alva_xu/article/details/84578787" rel="nofollow">ELK 日志平台搭建实战</a></p>

<p>2,改造Zipkin server</p>

<p>(1)加依赖,在POM.XML去处第五章的mysql相关依赖,增加ElasticSearch相关依赖</p>

<pre class="has"><code class="hljs xml"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;dependency&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;groupId&gt;mysql&lt;/groupId&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;/dependency&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;dependency&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-comment">&lt;!-- &lt;/dependency&gt; --&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>io.zipkin.java<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>zipkin<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>io.zipkin.java<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>zipkin-autoconfigure-storage-elasticsearch-http<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.28.0<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>(2)改配置,在application.yml去除mysql相关配置,加上Zipkin的配置,配置了zipkin的存储类型为elasticsearch,使用的StorageComponent为elasticsearch,然后需要配置elasticsearch,包括hosts,可以配置多个,用“,”隔开;index为zipkin等,具体配置如下:</p>

<pre class="has"><code class="hljs delphi"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">server:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> port: <span class="hljs-number">9411</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">spring:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> application:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">name</span>: zipkin-server</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> rabbitmq:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> host: localhost</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> port: <span class="hljs-number">5672</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> username: guest</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> password: guest</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">zipkin:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> storage:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">type</span>: elasticsearch</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> StorageComponent: elasticsearch</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> elasticsearch:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> cluster: elasticsearch</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> max-requests: <span class="hljs-number">30</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">index</span>: zipkin</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">index</span>-shards: <span class="hljs-number">3</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-keyword">index</span>-replicas: <span class="hljs-number">1</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> hosts: <span class="hljs-number">192.168</span>.<span class="hljs-number">122.10</span>:<span class="hljs-number">9200</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">eureka:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> client:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> service-url:</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> defaultZone: http:<span class="hljs-comment">//localhost:8761/eureka/</span></div></div></li></ol></code><div class="hljs-button signin" data-title="登录后复制" onclick="hljs.signin(event)"></div></pre>

<p>此处hosts192.168.122.10为我的ELK服务的虚机地址。</p>

<p>(3)代码不用改</p>

<p>3,重启各个服务,并进行访问操作</p>

<p>4,登录RabbitMQ管理界面,可以看到,有数据传输</p>

<p><img alt="" class="has" height="181" src="https://img-blog.csdnimg.cn/20181203133509170.png" width="552"></p>

<p>5,查看kibana,可以看到ElasticSearch数据库有新的以zipkin为index 的Sleuth信息被存储进去</p>

<p><img alt="" class="has" height="561" src="https://img-blog.csdnimg.cn/20181203133700293.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="698"></p>

<p>6,打开Zipkin-UI ,同样可以看到有数据显示</p>

<p><img alt="" class="has" height="539" src="https://img-blog.csdnimg.cn/20181203133822368.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2FsdmFfeHU=,size_16,color_FFFFFF,t_70" width="1200"></p>

<h2>总结</h2>

<p>本文详细介绍了Spring cloud zipkin通过http和rabbitMQ收集sleuth信息到collector,存入到mysql和ElasticSearch,并通过Zipkin UI展示的方法。</p>

<p>本文代码在github 上可以下载: <a href="https://github.com/alvaxu/zipkinlearn" rel="nofollow">https://github.com/alvaxu/zipkinlearn</a></p>

<p>&nbsp;</p>

<p>注:本文参考了方志鹏的博客<a href="https://blog.csdn.net/forezp/article/details/76795269" rel="nofollow">Spring Cloud Sleuth进阶实战</a></p> </div> 原文地址:https://blog.csdn.net/alva_xu/article/details/84648249 </div>

o
粉丝 1
博文 500
码字总数 0
作品 0
私信 提问
加载中
请先登录后再评论。
SpringCloud(七)之SpringCloud的链路追踪组件Sleuth实战,以及 zipkin 的部署和使用

一、前言 Spring Cloud Sleuth 主要功能就是在分布式系统中提供追踪解决方案 ,并且兼容了zipkin,提供了REST API接口来辅助我们查询跟踪数据以实现对分布式系统的监控程序 。 Sleuth 是个组件...

osc_ypm51igr
2019/02/21
16
0
SpringCloud 基础教程(十二)-Zipkin 分布式链路追踪系统搭建

 我的博客:程序员笑笑生,欢迎浏览博客!  上一章 SpringCloud 基础教程(十一)-Sleuth 调用链追踪简介当中,我们将介绍了Spring Cloud Sleuth在分布式环境中实现了调用链路信息的打印,本章...

程序员笑笑生
02/04
140
0
Spring Cloud Sleuth 链路追踪

学习在 Spring Cloud 中使用 Sleuth 实现链路追踪,包括基本使用、异步任务、定时任务等功能,并结合 Zipkin 展示收集到的信息。 1 概述 在大规模的分布式系统中,一个完整的系统是由很多种不...

程序员35
05/25
18
0
SpringCloud 微服务 (十六) 服务追踪 Zipkin

问题 在服务中,有一个接口,该A接口中又调用了其他服务的B、C、D接口,出现一个请求耗时大的问题,这时候并不知道该B、C、D接口中哪个接口造成的耗时量,然后比如确定C服务接口出现的耗时量大,但...

_大侠__
2018/07/21
2.7K
0
Spring Cloud 系列之 Sleuth 链路追踪(一)

随着微服务架构的流行,服务按照不同的维度进行拆分,一次请求往往需要涉及到多个服务。互联网应用构建在不同的软件模块集上,这些软件模块,有可能是由不同的团队开发、可能使用不同的编程语...

哈喽沃德先生
04/27
0
0

没有更多内容

加载失败,请刷新页面

加载更多

什么是token及怎样生成token

什么是token   Token是服务端生成的一串字符串,以作客户端进行请求的一个令牌,当第一次登录后,服务器生成一个Token便将此Token返回给客户端,以后客户端只需带上这个Token前来请求数据即...

osc_zzg7fpke
56分钟前
10
0
往事不堪回首

开局一张图,内容全靠编 从12年大学毕业到如今,兜兜转转,依然在码工,码农,码代码的路上徘徊着,从最初的用asp.net写站点,写内部的CRM,内部管理系统,内部的XXX,很难想象内部的系统居然...

osc_9os5791s
57分钟前
23
0
java 事件监听器

package com.qimh.springbootfiledemo.listener;/** * 事件监听器 * 监听person 事件源的eat 和 sleep 的方法 * @author */public interface PersonListener { void doEa...

qimh
57分钟前
21
0
[原创.数据可视化系列之四]跨平台,多格式的等值线和等值面的生成

这些年做项目的时候,碰到等值面基本都是arcgis server来支撑的,通过构建GP服务,一般的都能满足做等值线和等值面的需求。可是突然有一天,我发现如果没有arcgis server 的话,我既然没法生...

osc_bvincwvq
57分钟前
16
0
个人作业——软件工程实践总结&个人技术博客

这个作业属于哪个课程 2020春|S班(福州大学) 这个作业要求在哪里 个人作业——软件工程实践总结&个人技术博客 这个作业的目标 总结软件工程课程以及实践中的收获 作业正文 其他参考文献 一...

osc_9piujk2x
58分钟前
18
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部