opentelemetry-python icon indicating copy to clipboard operation
opentelemetry-python copied to clipboard

Documentation request - python opentelemetry-propagator-b3

Open ColeSiegelTR opened this issue 3 years ago • 2 comments

Hi,

I'm looking to use python opentelemetry-propagator-b3 in order to integrate create custom traces with service mesh traces generated by Istio.

I think in order to do this I need to propagate the b3 headers or assign them into my OpenTelemetry span somehow, but the b3 propagator doesn't do anything when I try the below:

from opentelemetry.propagators.b3 import B3MultiFormat
# https://opentelemetry.io/docs/instrumentation/python/getting-started/#configure-your-http-propagator-b3-baggage
# use B3MultiFormat since thats what istio sends?
set_global_textmap(B3MultiFormat())

Any suggestions or possibly a quick example I could refer to? Thanks!

ColeSiegelTR avatar May 06 '22 19:05 ColeSiegelTR

Maybe it doesn't work because of https://github.com/open-telemetry/opentelemetry-python/issues/2629 ?

ColeSiegelTR avatar May 06 '22 19:05 ColeSiegelTR

@ColeSiegelTR You don't have to do anything except setting the propagator (which you are doing already). What is the issue you are running into? Are you seeing the broken traces?

srikanthccv avatar May 13 '22 13:05 srikanthccv