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

API sets tracecontext, baggage as default global propagators

Open pellared opened this issue 3 years ago • 0 comments

https://github.com/open-telemetry/opentelemetry-python/blob/ec3053efd835d1776112447808712ba52f9c70ad/opentelemetry-api/src/opentelemetry/propagate/init.py#L124-L146

This behavior is in direct conflict with the API specification:

The OpenTelemetry API MUST use no-op propagators unless explicitly configured otherwise.

I think the SDK could do that, but not the API.

Side note: I find such logic in init violating the style guide: https://google.github.io/styleguide/pyguide.html#25-global-variables

Origin: Found by @Aneurysm9 when discussing https://github.com/open-telemetry/opentelemetry-go/issues/2611

pellared avatar Feb 16 '22 07:02 pellared