<p>I am using below GitHub link to setup opentracing with <a href="https://github.com/jaegertracing/jaeger" rel="nofollow noreferrer">Jaeger</a>
for microservices hosted in kubernetes env and it works fine for Java apps like Jenkins.
<a href="https://github.com/lucas-matt/auto-tracing-webhook" rel="nofollow noreferrer">https://github.com/lucas-matt/auto-tracing-webhook</a></p>
<p><a href="https://medium.com/opentracing/opentracing-on-kubernetes-get-yer-tracing-for-free-7a69cca03c8a" rel="nofollow noreferrer">https://medium.com/opentracing/opentracing-on-kubernetes-get-yer-tracing-for-free-7a69cca03c8a</a></p>
<p>However when I try to setup tracing for any Spring Boot application, it does not show any tracing in Jaeger UI.</p>
<p>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.</p>
<p><a href="https://github.com/opentracing-contrib/java-spring-jaeger" rel="nofollow noreferrer">https://github.com/opentracing-contrib/java-spring-jaeger</a></p>
<p>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.</p>
<pre><code>JAVA_AGENT = ' -javaagent:/mnt/auto-trace/opentracing-specialagent-1.7.0.jar -Dsa.tracer=jaeger -Dsa.log.level=FINE'
</code></pre>
<p>Please suggest!</p>

Ashish Gupta
<p>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:</p>
<pre><code>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
</code></pre>
<p>Then, you need to define the bean:</p>
<pre><code>@Bean
public io.opentracing.Tracer jaegerTracer() {
  return new com.uber.jaeger.Configuration(&quot;myApp&quot;)
    .withSampler(SamplerConfiguration.fromEnv())
    .withReporter(ReporterConfiguration.fromEnv())
    .getTracer();
}
</code></pre>
