You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. I am building a cli which may-or-may-not have opentelemetry enabled. We initialize tracing early on and conditionally enable opentelemetry based on some flags. We use reload layers starting with None to allow enabling layers later on. Everything works, except context propagation. If the layer is not present when the registry is init'ed, WithContext is not set up correctly meaning set_parent and friends silently fails due to not being able to downcast the subscriber (L142).
I can confirm this does not work as expected even if the reload layer is initialized with Some(T) either. The layer does work if you use a Some(T) without the reload layer, however.
Bug Report
Hi there. I am building a cli which may-or-may-not have opentelemetry enabled. We initialize tracing early on and conditionally enable opentelemetry based on some flags. We use reload layers starting with
None
to allow enabling layers later on. Everything works, except context propagation. If the layer is not present when the registry is init'ed,WithContext
is not set up correctly meaningset_parent
and friends silently fails due to not being able to downcast the subscriber (L142).tracing-opentelemetry/src/span_ext.rs
Lines 139 to 150 in 5e3354e
I can confirm this does not work as expected even if the reload layer is initialized with
Some(T)
either. The layer does work if you use a Some(T) without the reload layer, however.Version
Platform
macOS / Linux
The text was updated successfully, but these errors were encountered: