You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spring Boot应用接入Jaeger链路追踪无上报数据问题咨询

Spring Boot应用Jaeger链路追踪无数据解决方案

配置修正说明

你使用的OpenTracing SpecialAgent已内置Spring Boot适配能力,无需手动修改应用代码引入Spring Boot专用starter,仅需补充完善现有JAVA_AGENT参数即可生效。

修正后的JAVA_AGENT配置

JAVA_AGENT = ' -javaagent:/mnt/auto-trace/opentracing-specialagent-1.7.0.jar -Dsa.tracer=jaeger -Dsa.log.level=FINE -Djaeger.service.name=替换为你的Spring Boot应用标识名 -Djaeger.agent.host=替换为Jaeger Agent在K8s集群内的访问地址 -Djaeger.agent.port=6831 -Dsa.integration.spring.boot.enabled=true'

新增参数说明

  • -Djaeger.service.name:必填参数,用于在Jaeger UI中区分不同应用,每个应用需配置独立名称
  • -Djaeger.agent.host、-Djaeger.agent.port:指定链路数据的上报地址,若你使用Jaeger Collector HTTP上报可替换为-Djaeger.endpoint=http://替换为Jaeger Collector地址:14268/api/traces
  • -Dsa.integration.spring.boot.enabled=true:显式开启SpecialAgent的Spring Boot埋点适配,确保链路数据能正常采集

无数据排查步骤

如果修改配置后仍无链路数据,按以下顺序排查:

  • 查看应用启动日志,确认SpecialAgent已正常加载Spring Boot适配插件,无初始化报错
  • 检查K8s集群网络策略,确保应用所在Pod可以正常访问Jaeger Agent/Collector的对应端口
  • 确认Spring Boot版本适配范围:opentracing-specialagent 1.7.0支持Spring Boot 1.x、2.1~2.4版本,超出范围需升级SpecialAgent版本

可选操作(无需JavaAgent场景)

如果你放弃无侵入的JavaAgent方案,才需要将Spring Boot Jaeger Starter依赖添加到应用的pom.xml或build.gradle配置文件中,重新打包应用后生效,不符合你当前使用的K8s自动注入方案的设计目标,不推荐使用。

内容的提问来源于stack exchange,提问作者Ashish Gupta

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.25 13:06:04