slueth 使用 rxjava2 创建多个跟踪

问题描述 投票:0回答:1

我在 Spring Boot 中使用 Spring Cloud slueth 和 zipkin 来跟踪服务调用。

我的Spring Cloud版本是Edgware.RELEASE

现在,当我尝试跟踪使用 rxjava 的外观层时,它为单个请求创建 12 个跟踪?

我该怎么办?我的意思是我只想为外观层的 1 个请求生成 1 个跟踪(外观层使用 rxjava 进行并行调用)。

我正在将 slueth 与 http 一起使用,并且如果属性文件没有更改任何属性

我添加了这两个依赖项:

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

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

我已将其添加到属性文件中:

spring.zipkin.baseUrl: http://172.16.3.197:9411/
spring.slueth.enabled: true
spring.sleuth.sampler.percentage: 1
spring-cloud zipkin spring-cloud-sleuth
1个回答
0
投票

你找到这个问题的答案了吗?我现在正在为此苦苦挣扎

© www.soinside.com 2019 - 2024. All rights reserved.