Skip to content

Commit 7bdd2f4

Browse files
fix: re-export WithContext in the same place (open-telemetry#2879)
Co-authored-by: Cijo Thomas <[email protected]>
1 parent af3a33e commit 7bdd2f4

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

opentelemetry/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ predictable and efficient observability pipelines.
2525

2626
- re-export `tracing` for `internal-logs` feature to remove the need of adding `tracing` as a dependency
2727

28+
## 0.29.1
29+
30+
Release 2025-Apr-01
31+
32+
- Bug Fix: Re-export `WithContext` at `opentelemetry::trace::context::WithContext` [#2879](https://github.com/open-telemetry/opentelemetry-rust/pull/2879) to restore backwards compatability
33+
- The new path for `WithContext` and `FutureExt` are in `opentelemetry::context` as they are independent of the trace signal. Users should prefer this path.
34+
2835
## 0.29.0
2936

3037
Released 2025-Mar-21

opentelemetry/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::sync::Arc;
2424
mod future_ext;
2525

2626
#[cfg(feature = "futures")]
27-
pub use future_ext::FutureExt;
27+
pub use future_ext::{FutureExt, WithContext};
2828

2929
thread_local! {
3030
static CURRENT_CONTEXT: RefCell<ContextStack> = RefCell::new(ContextStack::default());

opentelemetry/src/trace/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::{
77
use std::{borrow::Cow, error::Error, sync::Mutex};
88

99
// Re-export for compatability. This used to be contained here.
10-
pub use crate::context::FutureExt;
10+
pub use crate::context::{FutureExt, WithContext};
1111

1212
const NOOP_SPAN: SynchronizedSpan = SynchronizedSpan {
1313
span_context: SpanContext::NONE,

opentelemetry/src/trace/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ mod tracer;
176176
mod tracer_provider;
177177

178178
pub use self::{
179-
context::{get_active_span, mark_span_as_active, FutureExt, SpanRef, TraceContextExt},
179+
context::{
180+
get_active_span, mark_span_as_active, FutureExt, SpanRef, TraceContextExt, WithContext,
181+
},
180182
span::{Span, SpanKind, Status},
181183
span_context::{SpanContext, TraceState},
182184
tracer::{SamplingDecision, SamplingResult, SpanBuilder, Tracer},

0 commit comments

Comments
 (0)