简体   繁体   中英

Spring Boot application with Jaeger

I am using below GitHub link to setup opentracing with Jaeger and it works fine for Java apps like Jenkins. https://github.com/lucas-matt/auto-tracing-webhook

https://medium.com/opentracing/opentracing-on-kubernetes-get-yer-tracing-for-free-7a69cca03c8a

However when I try to setup tracing for any Spring Boot application, it does not show any tracing in Jaeger UI.

After some research, I found that I need to add some starter code to trace Spring Boot application as given in below GitHub. However I am confused now, where to add this starter code.

https://github.com/opentracing-contrib/java-spring-jaeger

I am using below agent to trace and seems like I need to add some flag for Spring Boot here but I am not getting exactly.

JAVA_AGENT = ' -javaagent:/mnt/auto-trace/opentracing-specialagent-1.7.0.jar -Dsa.tracer=jaeger -Dsa.log.level=FINE'

Please suggest!

I worked with Jaeger and springboot few years ago. In a dockerized environment, I remember you have to supply few environment variables to the application, something like:

JAEGER_AGENT_HOST=jaeger-agent.example.io
JAEGER_AGENT_PORT=5775
JAEGER_SAMPLER_TYPE=const
JAEGER_SAMPLER_PARAM=1
JAEGER_SAMPLER_MANAGER_HOST_PORT=jaeger-agent.example.io:5778
JAEGER_REPORTER_LOG_SPANS=true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM