Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the global Propagators default to a no-op instance. #721

8 changes: 3 additions & 5 deletions specification/context/api-propagators.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,9 @@ Required arguments:
Implementations MAY provide global `Propagator`s for
each supported `Propagator` type.

If offered, the global `Propagator`s should default to a composite `Propagator`
containing the W3C Trace Context Propagator and the Correlation Context `Propagator`
specified in [api-correlationcontext.md](../correlationcontext/api.md#serialization),
in order to provide propagation even in the presence of no-op
OpenTelemetry implementations.
If offered, the global `Propagator`s MUST default to a no-op instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlosalberto in this PR are you advocating for code cleanliness or scenario? This may be the root of the misunderstanding. I think myself, @yurishkuro and @bogdandrutu all advocating for a long term goal of having context ambiently propagated everywhere. It may be that the extensions you mentioned below would be the mechanism of this enablement, but I believe this context should be everywhere.

For example, to explain better what happens in .NET. - there is no context propagation when nothing is enabled. But even smaller level of logging enablement (which is default) will enable context propagation. We clearly recognize some people want to turn it off, But default is ON.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the lack of context. A week ago, in the Specification SIG call (at least @bogdandrutu was there), we came to an agreement on having the API with no-op Propagators by default (.Net will keep its current behavior, given the specific needs of how it's used in the .Net framework and how things are instrumented by default).

But even smaller level of logging enablement (which is default) will enable context propagation

Oh, actually this is what I tried to convey when I mentioned OpenTelemetry extensions (same in spirit, although not quite the same).

cc @bogdandrutu @yurishkuro

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users MUST call [Set Global Propagator](#set-global-propagator) to
carlosalberto marked this conversation as resolved.
Show resolved Hide resolved
override the default value.

### Get Global Propagator

Expand Down