Spring Boot 2.0.2版本的OpenTracing在Jaeger中不产生任何跟踪



我正在为Spring Boot 2.0.2应用程序设置OpenTracing/Jaeger。从Spring Boot 1.5.3的一个有效但非常好的示例开始,我转到了Spring Boot 2.0.2,它正确地发送了跟踪。但那里使用的依赖关系非常旧(比如opentraceingspring-web自动配置的0.0.4,它现在在0.3.2中可用(

因此,我将应用程序迁移到最新的依赖项,这导致Jaeger中不再出现任何痕迹。

我已将测试上传到https://gitlab.com/ceedee_/opentracing-spring-boot.分支机构如下:

  1. master->Spring 1.5.3实现(工作(
  2. spring-bot-2-0-2-RELEASE->spring 2.0.2实现(使用过时的deps(
  3. spring-bot-2-0-2-RELEASE-latest-deps->spring 2.0.2实现(不起作用!(

与2。至3。如下所示:

  1. 为更新的依赖项更新了pom.xml
  2. jaegerTracerbean使用构建器(不再配置ConstSampler,应该是默认值(
  3. application.properties激活了Const Sampler(由于它没有改进任何内容而被注释掉(

有人知道我做错了什么吗?关于调试OpenTracing/Jaeger的提示也很感激!

谨致问候,cd_

问题是Report实例使用了NoopSender,因此忽略了连接设置。

使用

<dependency>
<groupId>io.jaegertracing</groupId>
<artifactId>jaeger-thrift</artifactId>
<version>0.32.0</version>
</dependency>

在您的POM中,将向Jaeger的SenderResolver::resolve方法使用的SenderFactory提供适当的Sender。

这解决了我的问题。

最新更新