Skip to content

Commit 5f0ba94

Browse files
committed
chore: update changelogs
1 parent 368621e commit 5f0ba94

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

opentelemetry-sdk/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
- Added `Resource::get_ref(&self, key: &Key) -> Option<&Value>` to allow retrieving a reference to a resource value without cloning.
66
- **Breaking** Removed the following public hidden methods from the `SdkTracer` [#3227][3227]:
77
- `id_generator`, `should_sample`
8-
- **Fix**: Fixed panic when `SpanProcessor::on_end` calls `Context::current()` ([#3262][3262]).
9-
- Updated `SpanProcessor::on_end` documentation to clarify that `Context::current()` returns the parent context, not the span's context
8+
- **Fix**: Fixed panic when `SpanProcessor::on_end` calls `Context::current()` ([#2871][2871]).
9+
- Updated `SpanProcessor::on_end` documentation to clarify that `Context::current()` should not be relied upon in `on_end`
10+
- `Context::current()` returns whatever context happens to be active, which may be unrelated to the span being ended
1011
- Added best practice guidance: extract context information in `on_start` and store as span attributes
1112
- Documented that the panic fix in `opentelemetry` allows safe calls to `Context::current()` from `on_end`
1213

opentelemetry/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
- `with_trace_id`, `with_span_id`, `with_end_time`, `with_status`, `with_sampling_result`
99
- **Added** `#[must_use]` attribute to `opentelemetry::metrics::AsyncInstrumentBuilder` to add compile time warning when `.build()` is not called on observable instrument builders, preventing silent failures where callbacks are never registered and metrics are never reported.
1010
- **Fix**: Fixed panic when calling `Context::current()` from `Drop` implementations triggered by `ContextGuard` cleanup ([#2871][2871]).
11-
- Modified `ContextGuard::drop` to extract the context outside of `borrow_mut()` scope before dropping it
11+
- Modified `ContextGuard::drop` to extract only the span (not the entire context) outside of `borrow_mut()` scope before dropping it
1212
- This prevents "RefCell already mutably borrowed" panics when Span's `Drop` implementation calls `Context::current()` during context cleanup
13-
- **Note**: `Context::current()` called from within a Drop triggered by context cleanup will return the parent context, not the context being dropped (documented behavior)
13+
- **Important**: `Context::current()` called from within a Drop triggered by context cleanup returns whatever context happens to be current at that moment, which may be unrelated to the context being dropped
1414

1515
[3227]: https://github.com/open-telemetry/opentelemetry-rust/pull/3227
1616
[2871]: https://github.com/open-telemetry/opentelemetry-rust/issues/2871

0 commit comments

Comments
 (0)