Skip to content

Commit b2eb8b0

Browse files
committed
[DOC] Add changelog entry for the null global provider fix
1 parent a93708b commit b2eb8b0

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,24 @@ Increment the:
185185
`trace_based` to match the specification.
186186
[#4328](https://github.com/open-telemetry/opentelemetry-cpp/pull/4328)
187187

188+
Important changes:
189+
190+
* [API] Never set a null global provider or propagator
191+
[#4420](https://github.com/open-telemetry/opentelemetry-cpp/pull/4420)
192+
193+
* `trace::Provider::SetTracerProvider()`,
194+
`metrics::Provider::SetMeterProvider()`,
195+
`logs::Provider::SetLoggerProvider()`,
196+
`logs::Provider::SetEventLoggerProvider()` and
197+
`context::propagation::GlobalTextMapPropagator::SetGlobalPropagator()`
198+
now install the corresponding no-op implementation when passed a null
199+
pointer, instead of storing the null. The matching getters therefore never
200+
return `nullptr`, as already documented, and code that resets a global
201+
during cleanup no longer risks a nullptr de-ref on a later use.
202+
**Note**: this is a correctness fix to an inline API header; the observable
203+
behavior of these methods changes towards the already documented contract
204+
(see `docs/abi-policy.md`).
205+
188206
Breaking changes:
189207

190208
* [CONFIGURATION] SDK default component builder libraries and example

0 commit comments

Comments
 (0)