File tree Expand file tree Collapse file tree 8 files changed +28
-15
lines changed
include/opentelemetry/metrics
include/opentelemetry/sdk/metrics Expand file tree Collapse file tree 8 files changed +28
-15
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,16 @@ Increment the:
15
15
16
16
## [ Unreleased]
17
17
18
+ * [ BUILD] Remove WITH_REMOVE_METER_PREVIEW, use WITH_ABI_VERSION_2 instead
19
+ [ #2370 ] ( https://github.com/open-telemetry/opentelemetry-cpp/pull/2370 )
20
+
21
+ Breaking changes:
22
+
23
+ * [ BUILD] Remove WITH_REMOVE_METER_PREVIEW, use WITH_ABI_VERSION_2 instead
24
+ [ #2370 ] ( https://github.com/open-telemetry/opentelemetry-cpp/pull/2370 )
25
+ * The experimental ` CMake ` option ` WITH_REMOVE_METER_PREVIEW ` is removed,
26
+ use option ` WITH_ABI_VERSION_2 ` instead.
27
+
18
28
## [ 1.12.0] 2023-10-16
19
29
20
30
* [ BUILD] Support ` pkg-config `
Original file line number Diff line number Diff line change @@ -114,11 +114,6 @@ if(WITH_ASYNC_EXPORT_PREVIEW)
114
114
target_compile_definitions (opentelemetry_api INTERFACE ENABLE_ASYNC_EXPORT )
115
115
endif ()
116
116
117
- if (WITH_REMOVE_METER_PREVIEW )
118
- target_compile_definitions (opentelemetry_api
119
- INTERFACE ENABLE_REMOVE_METER_PREVIEW )
120
- endif ()
121
-
122
117
target_compile_definitions (
123
118
opentelemetry_api
124
119
INTERFACE OPENTELEMETRY_ABI_VERSION_NO=${OPENTELEMETRY_ABI_VERSION_NO} )
Original file line number Diff line number Diff line change @@ -126,7 +126,19 @@ class MeterProvider
126
126
nostd::string_view schema_url = " " ) noexcept = 0;
127
127
#endif
128
128
129
- #ifdef ENABLE_REMOVE_METER_PREVIEW
129
+ #if OPENTELEMETRY_ABI_VERSION_NO >= 2
130
+ /* *
131
+ * Remove a named Meter instance (ABI).
132
+ *
133
+ * This API is experimental, see
134
+ * https://github.com/open-telemetry/opentelemetry-specification/issues/2232
135
+ *
136
+ * @since ABI_VERSION 2
137
+ *
138
+ * @param[in] name Meter instrumentation scope
139
+ * @param[in] version Instrumentation scope version, optional
140
+ * @param[in] schema_url Instrumentation scope schema URL, optional
141
+ */
130
142
virtual void RemoveMeter (nostd::string_view name,
131
143
nostd::string_view version = " " ,
132
144
nostd::string_view schema_url = " " ) noexcept = 0;
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ class NoopMeterProvider final : public MeterProvider
214
214
}
215
215
#endif
216
216
217
- #ifdef ENABLE_REMOVE_METER_PREVIEW
217
+ #if OPENTELEMETRY_ABI_VERSION_NO >= 2
218
218
void RemoveMeter (nostd::string_view /* name */ ,
219
219
nostd::string_view /* version */ ,
220
220
nostd::string_view /* schema_url */ ) noexcept override
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ elif [[ "$1" == "cmake.maintainer.sync.test" ]]; then
112
112
-DWITH_OTLP_HTTP=ON \
113
113
-DWITH_OTLP_HTTP_SSL_PREVIEW=ON \
114
114
-DWITH_OTLP_HTTP_SSL_TLS_PREVIEW=ON \
115
- -DWITH_REMOVE_METER_PREVIEW=ON \
116
115
-DWITH_PROMETHEUS=ON \
117
116
-DWITH_EXAMPLES=ON \
118
117
-DWITH_EXAMPLES_HTTP=ON \
@@ -135,7 +134,6 @@ elif [[ "$1" == "cmake.maintainer.async.test" ]]; then
135
134
-DWITH_OTLP_HTTP=ON \
136
135
-DWITH_OTLP_HTTP_SSL_PREVIEW=ON \
137
136
-DWITH_OTLP_HTTP_SSL_TLS_PREVIEW=ON \
138
- -DWITH_REMOVE_METER_PREVIEW=ON \
139
137
-DWITH_PROMETHEUS=ON \
140
138
-DWITH_EXAMPLES=ON \
141
139
-DWITH_EXAMPLES_HTTP=ON \
@@ -159,7 +157,6 @@ elif [[ "$1" == "cmake.maintainer.cpp11.async.test" ]]; then
159
157
-DWITH_OTLP_HTTP=ON \
160
158
-DWITH_OTLP_HTTP_SSL_PREVIEW=ON \
161
159
-DWITH_OTLP_HTTP_SSL_TLS_PREVIEW=ON \
162
- -DWITH_REMOVE_METER_PREVIEW=ON \
163
160
-DWITH_PROMETHEUS=ON \
164
161
-DWITH_EXAMPLES=ON \
165
162
-DWITH_EXAMPLES_HTTP=ON \
@@ -181,7 +178,6 @@ elif [[ "$1" == "cmake.maintainer.abiv2.test" ]]; then
181
178
-DWITH_OTLP_HTTP=ON \
182
179
-DWITH_OTLP_HTTP_SSL_PREVIEW=ON \
183
180
-DWITH_OTLP_HTTP_SSL_TLS_PREVIEW=ON \
184
- -DWITH_REMOVE_METER_PREVIEW=ON \
185
181
-DWITH_PROMETHEUS=ON \
186
182
-DWITH_EXAMPLES=ON \
187
183
-DWITH_EXAMPLES_HTTP=ON \
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class OPENTELEMETRY_EXPORT MeterProvider final : public opentelemetry::metrics::
66
66
nostd::string_view schema_url = " " ) noexcept override ;
67
67
#endif
68
68
69
- #ifdef ENABLE_REMOVE_METER_PREVIEW
69
+ #if OPENTELEMETRY_ABI_VERSION_NO >= 2
70
70
void RemoveMeter (nostd::string_view name,
71
71
nostd::string_view version,
72
72
nostd::string_view schema_url) noexcept override ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ nostd::shared_ptr<metrics_api::Meter> MeterProvider::GetMeter(
75
75
return nostd::shared_ptr<metrics_api::Meter>{meter};
76
76
}
77
77
78
- #ifdef ENABLE_REMOVE_METER_PREVIEW
78
+ #if OPENTELEMETRY_ABI_VERSION_NO >= 2
79
79
void MeterProvider::RemoveMeter (nostd::string_view name,
80
80
nostd::string_view version,
81
81
nostd::string_view schema_url) noexcept
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ TEST(MeterProvider, GetMeterAbiv2)
191
191
}
192
192
#endif /* OPENTELEMETRY_ABI_VERSION_NO >= 2 */
193
193
194
- #ifdef ENABLE_REMOVE_METER_PREVIEW
194
+ #if OPENTELEMETRY_ABI_VERSION_NO >= 2
195
195
TEST (MeterProvider, RemoveMeter)
196
196
{
197
197
MeterProvider mp;
@@ -225,4 +225,4 @@ TEST(MeterProvider, RemoveMeter)
225
225
mp.ForceFlush ();
226
226
mp.Shutdown ();
227
227
}
228
- #endif
228
+ #endif /* OPENTELEMETRY_ABI_VERSION_NO >= 2 */
You can’t perform that action at this time.
0 commit comments