Spring Cloud 微服务开发:入门、进阶与源码剖析 —— 10.2 Spring Cloud Sleuth 入门

10.2 Spring Cloud Sleuth 入门

10.2.1 Spring Cloud Sleuth 入门案例

先简单介绍一下案例目标,在本案例中,我们将会使用Feign、RestTemplate和新线程的方式调用下游服务,来观察每个请求在整体调用链中的TraceID和SpanID是否一致,包含两个服务,一个是Sleuth-Provider,另一个是Sleuth-Consumer,具体内容如下:

  1. 创建父工程ch10_1

工程ch10_1依赖pom.xml如下:

代码清单:ch10_1/pom.xml


<dependency>
    <groupId>org.springframework.boot</groupId>
    

猜你喜欢

转载自blog.csdn.net/meteor_93/article/details/104654711
今日推荐