<p>Evaluating Istio Sidecar proxies around the feature of distributed tracing, currently i am passing the tracing headers and accepting those as a part of the application code, Below are the headers:</p>

<pre><code>  "x-request-id"

  "x-b3-spanid"

  "x-b3-parentspanid"

  "x-b3-sampled"

  "x-b3-flags"

  "x-ot-span-context"
</code></pre>

<p>Is there a way where in these headers could be configured to be passed with requests at POD/ingress level so that i do not have to make any changes in the code in order to achieve the tracing between the services?</p>

vaibhav
<p>You can use a <a href="https://istio.io/docs/reference/config/networking/v1alpha3/virtual-service/?_ga=2.117117646.993977806.1566388284-1019622628.1562665692#Headers" rel="nofollow noreferrer">Virtual Service to add headers to any requests that gets routed by it</a>:</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: sample-route
spec:
  hosts:
  - '*'
  http:
  - route:
    - destination:
        host: app.prod.svc.cluster.local
      headers:
        request:
          add:
            key1: value1
            key2: value2
</code></pre>

<p>From there, you can attach the <code>Virtual Service</code> to a <code>Gateway</code> for your <code>Ingressgateway</code>.</p>
