Skip to content

Commit

Permalink
Change default propagator in unconfigured API (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyKanzhelev committed Sep 18, 2020
1 parent 708d5df commit 98fbae0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 23 additions & 8 deletions specification/context/api-propagators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 98fbae0

Please sign in to comment.