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

Improve defaulting for propagation #1404

Closed
dashpole opened this issue Dec 15, 2020 · 5 comments
Closed

Improve defaulting for propagation #1404

dashpole opened this issue Dec 15, 2020 · 5 comments
Labels
area:propagators Part of OpenTelemetry context propagation pkg:SDK Related to an SDK package
Milestone

Comments

@dashpole
Copy link
Contributor

Related to #1391

Currently, installing an SDK and plugins, such as otelhttp does not install any propagators. I encountered this in my personal experience trying to instrument a web service, and force sampling by sending a sampled trace context. I couldn't figure out why it wasn't working, and it took me a day of debugging to realize I needed to install a propagator. It is difficult to debug when this doesn't work. A user from gitter also ran into this problem, and this issue is based on a discussion there.

However, we can't set a default in the API: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/context/api-propagators.md#global-propagators
The OpenTelemetry API MUST use no-op propagators unless explicitly configured otherwise.

We could try and set the global propagator in NewTracerProvider, but that would have undesired behavior when using multiple TracerProviders, and might cause confusion if used in conjunction with SetTextMapPropagator(), since the default could clobber the user-set one. We could also do it in InstallNewPipeline for various export pipelines. This is probably better, since it also sets the global TracerProvider.

cc @MrAlias @jmacd @Aneurysm9

@dashpole
Copy link
Contributor Author

also related: #1265

@MrAlias
Copy link
Contributor

MrAlias commented Dec 17, 2020

Likely going to be related to this part of the SDK specification

General SDK Configuration

Name Description Default Notes
OTEL_PROPAGATORS Propagators to be used as a comma separated list "tracecontext,baggage" Values MUST be deduplicated in order to register a Propagator only once. Unrecognized values MUST generate a warning and be gracefully ignored.

@MrAlias MrAlias added area:propagators Part of OpenTelemetry context propagation pkg:SDK Related to an SDK package labels Jan 7, 2021
@Aneurysm9
Copy link
Member

Likely going to be related to this part of the SDK specification

General SDK Configuration

Name
Description
Default
Notes

OTEL_PROPAGATORS
Propagators to be used as a comma separated list
"tracecontext,baggage"
Values MUST be deduplicated in order to register a Propagator only once. Unrecognized values MUST generate a warning and be gracefully ignored.

Additional values can be specified in the respective SDK's documentation, in case third party Propagators are supported, such as "xray" or "ottracer".

That sounds like we'd need to provide a registration mechanism for third-party propagators.

@MrAlias
Copy link
Contributor

MrAlias commented Oct 12, 2022

Can this be closed in favor of recommending https://pkg.go.dev/go.opentelemetry.io/contrib/propagators/autoprop @dashpole ?

@dashpole
Copy link
Contributor Author

yes, definitely.

@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:propagators Part of OpenTelemetry context propagation pkg:SDK Related to an SDK package
Projects
None yet
Development

No branches or pull requests

4 participants