-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Comments
also related: #1265 |
Likely going to be related to this part of the SDK specification
|
That sounds like we'd need to provide a registration mechanism for third-party propagators. |
Can this be closed in favor of recommending https://pkg.go.dev/go.opentelemetry.io/contrib/propagators/autoprop @dashpole ? |
yes, definitely. |
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 withSetTextMapPropagator()
, since the default could clobber the user-set one. We could also do it inInstallNewPipeline
for various export pipelines. This is probably better, since it also sets the global TracerProvider.cc @MrAlias @jmacd @Aneurysm9
The text was updated successfully, but these errors were encountered: