Linux虚拟机上非all-in-one模式Jaeger最小运行配置求助
Jaeger非all-in-one模式的最小运行配置与问题解决
核心问题点
你之前的操作缺少了jaeger-agent组件,hotrod默认通过本地agent转发追踪数据到collector,没有agent的话,数据无法正常上报到collector,导致UI看不到任何服务。
最小运行组件及启动命令
Jaeger非all-in-one模式下,满足基本运行的最小组件组合有两种方案:
方案1:agent + collector + query(推荐,符合生产默认流程)
- 启动jaeger-collector(内存存储):
./jaeger-collector --span-storage.type=memory
默认监听端口:14250(gRPC,接收agent数据)、14268(HTTP,直接接收客户端数据)
- 启动jaeger-agent,指向collector的gRPC端口:
./jaeger-agent --reporter.grpc.host-port=localhost:14250
agent默认监听6831/6832(Thrift UDP),hotrod会自动往这个端口发送数据
- 启动jaeger-query(内存存储):
./jaeger-query --span-storage.type=memory
UI默认运行在http://hostname:16686
方案2:直接让hotrod上报到collector(无需agent)
如果不想启动agent,可以修改hotrod的启动参数,直接指定collector的HTTP端点:
./example-hotrod all --jaeger.endpoint=http://localhost:14268/api/traces
此时只需启动collector和query即可:
# 启动collector ./jaeger-collector --span-storage.type=memory # 启动query ./jaeger-query --span-storage.type=memory
验证步骤
- 按照上述任一方案启动组件后,运行hotrod
- 访问Jaeger UI,点击左侧「Services」下拉框,就能看到
hotrod服务 - 可以在hotrod界面做一些操作(比如下单),生成追踪数据,就能在UI中查询到对应的链路
内容的提问来源于stack exchange,提问作者Mark S
相关产品推荐
相关产品推荐

