Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
588 views
in Technique[技术] by (71.8m points)

opentracing - How to configure Jaeger agent to send traces to collector on another server

I'm trying to use Jaeger to manage tracing system. Docker is running locally "all-in-one" image with application (on the same host) without any issues. My question is how to configure jaeger agent on host1 that would send traces jaeger collector on another host2. Host2 is configured with "all-in-one". I can see Jaeger UI on host2 but it doesn't seem getting any traces from host1.

Configure tracer:

var configuration = new Configuration("service-name")
    .withSampler(Configuration.SamplerConfiguration.fromEnv())
    .withReporter(Configuration.ReporterConfiguration.fromEnv());
GlobalTracer.registerIfAbsent(configuration.getTracer());
return openTracer;

Added environment variables in yaml file on host1:

-e JAEGER_AGENT_HOST=jaeger.hostname.com 
-e JAEGER_AGENT_PORT=6831 

Added jaeger image in yaml file on host2:

$ docker run -d --name jaeger 
  -p 5775:5775/udp 
  -p 6831:6831/udp 
  -p 6832:6832/udp 
  -p 5778:5778 
  -p 16686:16686 
  -p 14268:14268 
  -p 9411:9411 
  jaegertracing/all-in-one:latest

Any suggestions will be appreciated.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...