diff --git a/CHANGELOG.md b/CHANGELOG.md index 38fc643b771..6719ac6113c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ release. New: +- Default propagators in un-configured API must be no-op + ([#930](https://github.com/open-telemetry/opentelemetry-specification/pull/930)). - Define resource mapping for Jaeger exporters ([#891](https://github.com/open-telemetry/opentelemetry-specification/pull/891)) - Add resource semantic conventions for operating systems diff --git a/specification/context/api-propagators.md b/specification/context/api-propagators.md index 654dd21e88c..17aff8f1eb5 100644 --- a/specification/context/api-propagators.md +++ b/specification/context/api-propagators.md @@ -267,14 +267,29 @@ Required arguments: ## Global Propagators -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 Baggage `Propagator` -specified in [api-baggage.md](../baggage/api.md#serialization), -in order to provide propagation even in the presence of no-op -OpenTelemetry implementations. +The OpenTelemetry API MUST provide a way to obtain a propagator for each +supported `Propagator` type. Instrumentation libraries SHOULD call propagators +to extract and inject the context on all remote calls. Propagators, depending on +the language, MAY be set up using various dependency injection techniques or +available as global accessors. + +**Note:** It is a discouraged practice, but certain instrumentation libraries +might use proprietary context propagation protocols or be hardcoded to use a +specific one. In such cases, instrumentation libraries MAY choose not to use the +API-provided propagators and instead hardcode the context extraction and injection +logic. + +The OpenTelemetry API MUST use no-op propagators unless explicitly configured +otherwise. Context propagation may be used for various telemetry signals - +traces, metrics, logging and more. Therefore, context propagation MAY be enabled +for any of them independently. For instance, a span exporter may be left +unconfigured, although the trace context propagation was configured to enrich logs or metrics. + +Platforms such as ASP.NET may pre-configure out-of-the-box +propagators. If pre-configured, `Propagator`s SHOULD default to a composite +`Propagator` containing the W3C Trace Context Propagator and the Baggage +`Propagator` specified in [api-baggage.md](../baggage/api.md#serialization). +These platforms MUST also allow pre-configured propagators to be disabled or overridden. ### Get Global Propagator