title: Propagate top-level span ID's in OpenTelemetry
body: <p>I'm trying to get OpenTelemetry tracing working with FastAPI and Requests. Currently, my setup looks like this:</p>
  <pre><code>import requests
  from opentelemetry.baggage.propagation import W3CBaggagePropagator
  from opentelemetry.propagators.composite import CompositePropagator
  from fastapi import FastAPI
  from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
  from opentelemetry.instrumentation.requests import RequestsInstrumentor
  from opentelemetry.propagate import set_global_textmap
  from opentelemetry.propagators.b3 import B3MultiFormat
  from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator
  
  set_global_textmap(CompositePropagator([B3MultiFormat(), TraceContextTextMapPropagator(), W3CBaggagePropagator()]))
  
  app = FastAPI()
  
  FastAPIInstrumentor.instrument_app(app)
  RequestsInstrumentor().instrument()
  
  @app.get(&quot;/&quot;)
  async def get_things():
      r = requests.get(&quot;http://localhost:8081&quot;)
  
      return {
          &quot;Hello&quot;: &quot;world&quot;,
          &quot;result&quot;: r.json()
      }
  
  </code></pre>
  <p>The <code>/</code> endpoint just does a GET to another service that looks basically like this one, just with some middleware to log the incoming headers.</p>
  <p>If I send a request like this (httpie format),</p>
  <pre><code>http :8000 'x-b3-traceid: f8c83f4b5806299983da51de66d9a242' 'x-b3-spanid: ba24f165998dfd8f' 'x-b3-sampled: 1'
  </code></pre>
  <p>I expect that the downstream service, i.e. the one being requested by <code>requests.get(&quot;http://localhost:8081&quot;)</code>, to receive headers that look something like</p>
  <pre><code>{
    &quot;x-b3-traceid&quot;: &quot;f8c83f4b5806299983da51de66d9a242&quot;,
    &quot;x-b3-spanid&quot;: &quot;xxxxxxx&quot;,  # some generated value from the upstream service
    &quot;x-b3-parentspanid&quot;: &quot;ba24f165998dfd8f&quot;, 
    &quot;x-b3-sampled&quot;: &quot;1&quot;
  }
  </code></pre>
  <p>But what I'm getting is basically exactly what I sent to the upstream service:</p>
  <pre><code>{
    &quot;x-b3-traceid&quot;: &quot;f8c83f4b5806299983da51de66d9a242&quot;,
    &quot;x-b3-spanid&quot;: &quot;ba24f165998dfd8f&quot;,
    &quot;x-b3-sampled&quot;: &quot;1&quot;
  }
  </code></pre>
  <p>I must be missing something obvious, but can't seem to figure out exactly what.</p>
  <p>Sending a W3C <code>traceparent</code> header results in the same exact situation (just with <code>traceparent</code> in the headers that are received downstream). Any pointers would be appreciated.</p>
  <p>EDIT - I'm not using any exporters, as in our environment, Istio is configured to export the traces. So we just care about the HTTP traces for now.</p>