<p>I have a microservices-based application Running on Kubernetes.
The microservices are built using dropwizard framework.</p>
<p>I would like to enable tracing in order to track the requests and have a solution that can help debug stuff.</p>
<p>Basically, I know the implementation using Spring boot which is pretty straightforward.
but I'm wondering how it could be in dropwizard based application?
actually, Is this is possible?
Can someone share his experience with this topic?
And provide me with resources or examples of how I can do that?</p>
<p>Please make sure that I'm not using a service mesh.</p>

Mohamed chiheb Ben jemaa
<p>I enabled instrumentation on the services using those two dependencies:</p>
<pre><code>        implementation &quot;io.opentracing.contrib:opentracing-jaxrs2:1.0.0&quot;
        implementation &quot;io.jaegertracing:jaeger-client:1.4.0&quot;
</code></pre>
<p>And, I used jaeger-client to configure the tracer using environment variables:</p>
<pre><code>JAEGER_SERVICE_NAME: yourServiceName
</code></pre>
<p>Getting a Tracer Instance:</p>
<pre><code>    public static Tracer jaegerTracer() {
        return Configuration.fromEnv()
                .getTracer();
    }
</code></pre>
<p>Finally, in the dropwizard application, you have to register the tracer like so</p>
<pre><code>   GlobalTracer.registerIfAbsent(jaegerTracer());
   jersey.register(new ServerTracingDynamicFeature());

  
    env.servlets()
           .addFilter(&quot;span-finisher&quot;, new SpanFinishingFilter())
           .addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, &quot;/*&quot;);
</code></pre>
