Spring, RabbitMQ, Sleuth and Zipkin: No tracings available in Zipkin

梦想与她 提交于 2021-02-11 14:42:55

问题


Im trying to implement distributed tracing using Spring, RabbitMQ, Sleuth and Zipkin. So I added the dependencies:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>

And configured sleuth and zipkin in my bootstrap.yml:

spring:
  sleuth:
    sampler:
      probability: 1.0
  zipkin:
    rabbitmq:
      addresses: ${RABBIT_MQ_HOST:localhost}:${RABBIT_MQ_PORT:5672}
    sender:
      type: rabbit

So starting my services and making some rest calls I get this in the logs:

zuul-gateway                    | 2020-04-01 01:49:25.453  INFO [zuul-gateway,384ce1318abef3f3,74ad64f70e120f4e,true] 1 --- [nio-8765-exec-4] d.f.z.ZuulLoggingFilter                               : request -> org.springframework.cloud.netflix.zuul.filters.pre.Servlet30RequestWrapper@70eb5e67 request uri -> /user-service/users
user-service-3                  | 2020-04-01 01:49:25.462  INFO [user-service,384ce1318abef3f3,4522ae801a21c30e,true] 1 --- [nio-8000-exec-2] de.fronetic.userservice.UserController                : Order by: age, Users: [User(id=4, lastName=Savona, firstName=Albert, age=101), User(id=3, lastName=Esposito, firstName=Derryl, age=12), User(id=1, lastName=Belmonte, firstName=Maeleth, age=14), User(id=6, lastName=Grillo, firstName=Madhu, age=21), User(id=2, lastName=Colt, firstName=Tychon, age=28), User(id=8, lastName=Causer, firstName=Stana, age=44), User(id=7, lastName=Seelen, firstName=Bellatrix, age=52), User(id=5, lastName=Hakobyan, firstName=Zinoviy, age=57)]
user-transformation-service     | 2020-04-01 01:49:25.475  INFO [user-transformation-service,384ce1318abef3f3,47a61185e3cca375,true] 1 --- [nio-8100-exec-7] d.f.u.UserTransformationController     : Users: [User(id=4, lastName=Savona, firstName=Albert, age=101), User(id=3, lastName=Esposito, firstName=Derryl, age=12), User(id=1, lastName=Belmonte, firstName=Maeleth, age=14), User(id=6, lastName=Grillo, firstName=Madhu, age=21), User(id=2, lastName=Colt, firstName=Tychon, age=28), User(id=8, lastName=Causer, firstName=Stana, age=44), User(id=7, lastName=Seelen, firstName=Bellatrix, age=52), User(id=5, lastName=Hakobyan, firstName=Zinoviy, age=57)]

For now it looks good. Sleuth added the tracing ID's. Calling the Zipkin UI I can see that the service names where added:

But there are no tracing informations at all:

So im wondering what im missing in my configuration.

EDIT

Turned out there are tracing informations arriving in zipkin. I can use the search bar in the top right corner to search for tracing id's directly:

I will then get:

So the question is why is there nothing in the overview or queryable via the trace lookup?

来源:https://stackoverflow.com/questions/60971627/spring-rabbitmq-sleuth-and-zipkin-no-tracings-available-in-zipkin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!