<p>I'm trying to set up a local k8s cluster and on <code>minikube</code> with installed <code>istio</code> and I have an issue with enabling distributed tracing with Jaeger.
I have 3 microservices <code>A -&gt; B -&gt; C</code>. I am propagating the all the headers that are needed:</p>

<pre><code>{"x-request-id", "x-b3-traceid", "x-b3-spanid", "x-b3-parentspanid", "x-b3-sampled", "x-b3-flags", "x-ot-span-context"}
</code></pre>

<p>But on Jaeger interface, I can only see the request to the service A and I cannot see the request going to service B.</p>

<p>I have logged the headers that are sent in the request.
Headers from service A:</p>

<pre><code>Header - x-request-id: c2804368-2ff0-9d90-a2aa-972537968924
Header - x-b3-traceid: 3a2400b40bbe5ed8
Header - x-b3-spanid: 3a2400b40bbe5ed8
Header - x-b3-parentspanid: 
Header - x-b3-sampled: 1
Header - x-b3-flags: 
Header - x-ot-span-context: 
</code></pre>

<p>Headers from service B:</p>

<pre><code>Header - x-request-id: c2804368-2ff0-9d90-a2aa-972537968924
Header - x-b3-traceid: 3a2400b40bbe5ed8
Header - x-b3-spanid: 3a2400b40bbe5ed8
Header - x-b3-parentspanid:
Header - x-b3-sampled: 1
Header - x-b3-flags:
Header - x-ot-span-context:
</code></pre>

<p>So the <code>x-request-id</code>, <code>x-b3-traceid</code>, <code>x-b3-sampled</code>, and <code>x-b3-spanid</code> mathces. There are some headers that aren't set.
Also, I'm accessing service A via k8s Service IP of type LoadBalancer, not via ingress. Don't know if this could be the issue.</p>

<p>UPD: I have setup istio gateway so now I'm accessing service <code>A</code> via istio gateway. However the result is the same, I can see the trace for <code>gateway-&gt;A</code> but no any further tracing</p>

Sergii Bishyr
<p>Some web frameworks return empty string if a non-existent header is queried. I have seen this in Spring Boot and KoaJS.</p>

<p>If any of the tracing headers is not sent by Istio, this header logic causes us to send empty string for those non-existent headers which breaks tracing.</p>

<p>My suggestion is after getting the values for headers filter out the ones with empty string as their values and propogate the remaining ones.</p>
