@@ -21,6 +21,60 @@ Increment the:
2121* [ CI] Upgrade to clang-format 18
2222 [ #2684 ] ( https://github.com/open-telemetry/opentelemetry-cpp/pull/2684 )
2323
24+ * [ API/SDK] Provider cleanup
25+ [ #2664 ] ( https://github.com/open-telemetry/opentelemetry-cpp/pull/2664 )
26+
27+ Important changes:
28+
29+ * [ API/SDK] Provider cleanup
30+ [ #2664 ] ( https://github.com/open-telemetry/opentelemetry-cpp/pull/2664 )
31+ * Before this fix:
32+ * The API class ` opentelemetry::trace::Tracer ` exposed methods such
33+ as ` ForceFlush() ` , ` ForceFlushWithMicroseconds() ` , ` Close() `
34+ and ` CloseWithMicroseconds() ` .
35+ * These methods are meant to be used when configuring the SDK,
36+ and should not be part of the API. Exposing them was an oversight.
37+ * Two of these methods are virtual, and therefore part of the ABI.
38+ * After this fix:
39+ * In ` OPENTELEMETRY_ABI_VERSION_NO 1 ` , nothing is changed,
40+ because removing this code would break the ABI.
41+ * In ` OPENTELEMETRY_ABI_VERSION_NO 2 ` , these methods are moved
42+ from the API to the SDK. This is a breaking change for ABI version 2,
43+ which is still experimental.
44+ * In all cases, instrumenting an application should not
45+ invoke flush or close on a tracer, do not use these methods.
46+
47+ Breaking changes:
48+
49+ * [ API/SDK] Provider cleanup
50+ [ #2664 ] ( https://github.com/open-telemetry/opentelemetry-cpp/pull/2664 )
51+ * Before this fix:
52+ * SDK factory methods such as:
53+ * opentelemetry::sdk::trace::TracerProviderFactory::Create()
54+ * opentelemetry::sdk::metrics::MeterProviderFactory::Create()
55+ * opentelemetry::sdk::logs::LoggerProviderFactory::Create()
56+ * opentelemetry::sdk::logs::EventLoggerProviderFactory::Create()
57+ returned an API object (opentelemetry::trace::TracerProvider)
58+ to the caller.
59+ * After this fix, these methods return an SDK level object
60+ (opentelemetry::sdk::trace::TracerProvider) to the caller.
61+ * Returning an SDK object is necessary for the application to
62+ cleanup and invoke SDK level methods, such as ForceFlush(),
63+ on a provider.
64+ * The application code that configures the SDK, by calling
65+ the various provider factories, may need adjustment.
66+ * All the examples have been updated, and in particular no
67+ longer perform static_cast do convert an API object to an SDK object.
68+ Please refer to examples for guidance on how to adjust.
69+ * If adjusting application code is impractical,
70+ an alternate and temporary solution is to build with option
71+ WITH_DEPRECATED_SDK_FACTORY=ON in CMake.
72+ * Option WITH_DEPRECATED_SDK_FACTORY=ON will allow to build code
73+ without application changes, posponing changes for later.
74+ * WITH_DEPRECATED_SDK_FACTORY=ON is temporary, only to provide
75+ an easier migration path. Expect this flag to be removed,
76+ as early as by the next release.
77+
2478Notes on experimental features:
2579
2680* [ #2372 ] ( https://github.com/open-telemetry/opentelemetry-cpp/issues/2372 )
0 commit comments