v1.16.0
版本发布时间: 2024-06-22 01:24:11
open-telemetry/opentelemetry-cpp最新发布版本:v1.16.1(2024-07-18 04:12:23)
v1.16.0 release
Release of core packages
- opentelemetry-api
- opentelemetry-sdk
and exporter packages:
- opentelemetry-exporter-otlp (gRPC + HTTP/JSON)
- opentelemetry-exporter-prometheus
What's Changed
- [BUILD] Upgrade bazel abseil from 20220623.1 to 20230802.2 by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2650
- [BUILD] Use
nostd::enable_if_t
instead ofstd::enable_if_t
by @owent in https://github.com/open-telemetry/opentelemetry-cpp/pull/2648 - [EXEMPLAR] Update ExemplarFilter and ExemplarReservoir for spec by @ThomsonTan in https://github.com/open-telemetry/opentelemetry-cpp/pull/2372
- [BUILD] Link CoreFoundation on apple systems because some dependency packages require it by @owent in https://github.com/open-telemetry/opentelemetry-cpp/pull/2655
- [SDK] Avoid missing conditional variable update and simplify atomic bool by @arekay in https://github.com/open-telemetry/opentelemetry-cpp/pull/2553
- [BUILD] Build break in OLTP_FILE tests by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2659
- [EXPORTER] General cleanup for is_shutdown_ flags in exporters. by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2663
- [CI] Upgrade Maintainers CI to ubuntu-24.04 by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2670
- [BUILD] Upgrade to opentelemetry-proto 1.3.1 by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2669
- [API] Return NoopLogRecord from NoopLogger by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2668
- [BUILD] Remove the hard-coded separator in tracestate by @ThomsonTan in https://github.com/open-telemetry/opentelemetry-cpp/pull/2672
- [SDK] Fix forceflush may wait for ever by @owent in https://github.com/open-telemetry/opentelemetry-cpp/pull/2584
- [API] DO not allow unsafe
Logger::EmitLogRecord
by @owent in https://github.com/open-telemetry/opentelemetry-cpp/pull/2673 - [BUILD] Read default proto version from
third_party_release
by @owent in https://github.com/open-telemetry/opentelemetry-cpp/pull/2677 - [CI] include-what-you-use by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2629
- [CI] Upgrade to clang-format 18 by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2684
- [CI] Fix CI failures on Ubuntu 24.04 by @lalitb in https://github.com/open-telemetry/opentelemetry-cpp/pull/2686
- [SEMANTIC CONVENTIONS] Upgrade to version 1.26.0 by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2687
- [API/SDK] Provider cleanup by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2664
- [ETW] Add table name mapping for Logs other than the default Log table by @ThomsonTan in https://github.com/open-telemetry/opentelemetry-cpp/pull/2691
- [CI] Remove benchmark overlay for vcpkg by @ThomsonTan in https://github.com/open-telemetry/opentelemetry-cpp/pull/2695
- [BUILD] Remove the incorrect set of CMAKE_MSVC_RUNTIME_LIBRARY for vcpkg by @ThomsonTan in https://github.com/open-telemetry/opentelemetry-cpp/pull/2696
- [BUILD] CMakeLists.txt: Enable CMAKE_MSVC_RUNTIME_LIBRARY support by @t-b in https://github.com/open-telemetry/opentelemetry-cpp/pull/2652
- [EXPORTER] OTLP file: use thread-safe file/io by @owent in https://github.com/open-telemetry/opentelemetry-cpp/pull/2675
- [bazel] Bump version and deps by @keith in https://github.com/open-telemetry/opentelemetry-cpp/pull/2679
- [BUILD] Add support for bzlmod by @keith in https://github.com/open-telemetry/opentelemetry-cpp/pull/2608
- [BUILD] Fix Import Abseil-cpp by @LeiZhang-Hunter in https://github.com/open-telemetry/opentelemetry-cpp/pull/2701
- [Code health] include-what-you-use cleanup by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2692
- [BUILD] Restore Bazel flag removed from public API by @dbolduc in https://github.com/open-telemetry/opentelemetry-cpp/pull/2702
- [DOC] Fix typo tace_id -> trace_id in logger.h by @yijiem in https://github.com/open-telemetry/opentelemetry-cpp/pull/2703
- Bump docker/build-push-action from 5 to 6 by @dependabot in https://github.com/open-telemetry/opentelemetry-cpp/pull/2705
- [CI] Enable ARM64 build in CI by @esigo in https://github.com/open-telemetry/opentelemetry-cpp/pull/2699
- [Code health] Remove Unicode Text from Source files by @perhapsmaple in https://github.com/open-telemetry/opentelemetry-cpp/pull/2707
- [BUILD] Add option
WITH_OTLP_GRPC_SSL_MTLS_PREVIEW
by @owent in https://github.com/open-telemetry/opentelemetry-cpp/pull/2714 - [EXPORTER] All 2xx return codes should be considered successful. by @owent in https://github.com/open-telemetry/opentelemetry-cpp/pull/2712
- [RELEASE] Release opentelemetry-cpp version 1.16.0 by @marcalff in https://github.com/open-telemetry/opentelemetry-cpp/pull/2711
Important changes
- [API/SDK] Provider cleanup
#2664
- Before this fix:
- The API class
opentelemetry::trace::Tracer
exposed methods such asForceFlush()
,ForceFlushWithMicroseconds()
,Close()
andCloseWithMicroseconds()
. - These methods are meant to be used when configuring the SDK, and should not be part of the API. Exposing them was an oversight.
- Two of these methods are virtual, and therefore part of the ABI.
- The API class
- After this fix:
- In
OPENTELEMETRY_ABI_VERSION_NO 1
, nothing is changed, because removing this code would break the ABI. - In
OPENTELEMETRY_ABI_VERSION_NO 2
, these methods are moved from the API to the SDK. This is a breaking change for ABI version 2, which is still experimental.
- In
- In all cases, instrumenting an application should not invoke flush or close on a tracer, do not use these methods.
- Before this fix:
Breaking changes
- [API/SDK] Provider cleanup
#2664
- Before this fix:
- SDK factory methods such as:
- opentelemetry::sdk::trace::TracerProviderFactory::Create()
- opentelemetry::sdk::metrics::MeterProviderFactory::Create()
- opentelemetry::sdk::logs::LoggerProviderFactory::Create()
- opentelemetry::sdk::logs::EventLoggerProviderFactory::Create() returned an API object (opentelemetry::trace::TracerProvider) to the caller.
- SDK factory methods such as:
- After this fix, these methods return an SDK level object (opentelemetry::sdk::trace::TracerProvider) to the caller.
- Returning an SDK object is necessary for the application to cleanup and invoke SDK level methods, such as ForceFlush(), on a provider.
- The application code that configures the SDK, by calling the various provider factories, may need adjustment.
- All the examples have been updated, and in particular no longer perform static_cast do convert an API object to an SDK object. Please refer to examples for guidance on how to adjust.
- If adjusting application code is impractical, an alternate and temporary solution is to build with option WITH_DEPRECATED_SDK_FACTORY=ON in CMake.
- Option WITH_DEPRECATED_SDK_FACTORY=ON will allow to build code without application changes, posponing changes for later.
- WITH_DEPRECATED_SDK_FACTORY=ON is temporary, only to provide an easier migration path. Expect this flag to be removed, as early as by the next release.
- Before this fix:
Notes on experimental features
-
#2372
introduced
MeterProvider::SetExemplar()
which accepts anExemplarFilterType
enumeration withkAlwaysOff
,kAlwaysOn
andkTraceBased
.
New Contributors
- @arekay made their first contribution in https://github.com/open-telemetry/opentelemetry-cpp/pull/2553
- @t-b made their first contribution in https://github.com/open-telemetry/opentelemetry-cpp/pull/2652
- @LeiZhang-Hunter made their first contribution in https://github.com/open-telemetry/opentelemetry-cpp/pull/2701
Full Changelog: https://github.com/open-telemetry/opentelemetry-cpp/compare/v1.15.0...v1.16.0