Bug Report
Version
v0.32.1
Platform
Linux x86_64
Description
tracing::Span::current().set_parent(parent_cx) could in the past be used for the receiving end of OTEL trace context propagation, but since 0.32 (specifically c4fe96a) it doesn't work anymore on entered spans.
If I'm not mistaken, that means there is no way to set the parent of a #[instrument] span, because these spans are entered automatically. #[instrument] has a parent argument, but that expects a tracing::Span, not an opentelemetry::Context, so I don't think fits the bill.
#[instrument] is by far the most ergonomic way to create spans for async functions, and it would be very limiting in my opinion to not be able to propagate trace context to these spans.
Bug Report
Version
v0.32.1
Platform
Linux x86_64
Description
tracing::Span::current().set_parent(parent_cx)could in the past be used for the receiving end of OTEL trace context propagation, but since 0.32 (specifically c4fe96a) it doesn't work anymore on entered spans.If I'm not mistaken, that means there is no way to set the parent of a
#[instrument]span, because these spans are entered automatically.#[instrument]has aparentargument, but that expects atracing::Span, not anopentelemetry::Context, so I don't think fits the bill.#[instrument]is by far the most ergonomic way to create spans for async functions, and it would be very limiting in my opinion to not be able to propagate trace context to these spans.