diff --git a/CHANGELOG.md b/CHANGELOG.md index c267bb48da..01f54cf339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ Increment the: * [BUILD] Remove WITH_REMOVE_METER_PREVIEW, use WITH_ABI_VERSION_2 instead [#2370](https://github.com/open-telemetry/opentelemetry-cpp/pull/2370) +* [BUILD] Make WITH_OTLP_HTTP_SSL_PREVIEW mainstream + [#2378](https://github.com/open-telemetry/opentelemetry-cpp/pull/2378) * [API] Add InstrumentationScope attributes in TracerProvider::GetTracer() [#2371](https://github.com/open-telemetry/opentelemetry-cpp/pull/2371) @@ -30,6 +32,15 @@ Important changes: * When building with `CMake` option `WITH_ABI_VERSION_1=ON` (by default) the `ABI` is unchanged, and the fix is not available. +* [BUILD] Make WITH_OTLP_HTTP_SSL_PREVIEW mainstream + [#2378](https://github.com/open-telemetry/opentelemetry-cpp/pull/2378) + * The experimental `CMake` option `WITH_OTLP_HTTP_SSL_PREVIEW` + is now promoted to stable. The default is changed to `ON`. + * The experimental `CMake` option `WITH_OTLP_HTTP_SSL_TLS_PREVIEW` + is now promoted to stable. The default is changed to `ON`. + * These build options are scheduled to be removed by the next release, + building without SSL/TLS will no longer be possible. + Breaking changes: * [BUILD] Remove WITH_REMOVE_METER_PREVIEW, use WITH_ABI_VERSION_2 instead diff --git a/CMakeLists.txt b/CMakeLists.txt index 4af81bf0e9..b72e58a963 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,12 +275,12 @@ endif() option(WITH_ASYNC_EXPORT_PREVIEW "Whether to enable async export" OFF) -# EXPERIMENTAL -option(WITH_OTLP_HTTP_SSL_PREVIEW "Whether to enable otlp http ssl export" OFF) +# STABLE +option(WITH_OTLP_HTTP_SSL_PREVIEW "Whether to enable otlp http ssl export" ON) -# EXPERIMENTAL +# STABLE option(WITH_OTLP_HTTP_SSL_TLS_PREVIEW - "Whether to enable otlp http ssl tls min/max/cipher options" OFF) + "Whether to enable otlp http ssl tls min/max/cipher options" ON) # Exemplar specs status is experimental, so behind feature flag by default option(WITH_METRICS_EXEMPLAR_PREVIEW diff --git a/sdk/include/opentelemetry/sdk/metrics/aggregation/default_aggregation.h b/sdk/include/opentelemetry/sdk/metrics/aggregation/default_aggregation.h index 6ae111fd85..4f3346707f 100644 --- a/sdk/include/opentelemetry/sdk/metrics/aggregation/default_aggregation.h +++ b/sdk/include/opentelemetry/sdk/metrics/aggregation/default_aggregation.h @@ -35,7 +35,8 @@ class DefaultAggregation case AggregationType::kSum: return (instrument_descriptor.value_type_ == InstrumentValueType::kLong) ? std::move(std::unique_ptr(new LongSumAggregation(is_monotonic))) - : std::move(std::unique_ptr(new DoubleSumAggregation(true))); + : std::move( + std::unique_ptr(new DoubleSumAggregation(is_monotonic))); break; case AggregationType::kHistogram: { if (instrument_descriptor.value_type_ == InstrumentValueType::kLong) diff --git a/sdk/test/metrics/sum_aggregation_test.cc b/sdk/test/metrics/sum_aggregation_test.cc index b355f134ed..403bf34b22 100644 --- a/sdk/test/metrics/sum_aggregation_test.cc +++ b/sdk/test/metrics/sum_aggregation_test.cc @@ -121,8 +121,12 @@ TEST(CounterToSum, Double) ASSERT_EQ(1000275.0, opentelemetry::nostd::get(actual.value_)); } -TEST(UpDownCounterToSum, Double) +class UpDownCounterToSumFixture : public ::testing::TestWithParam +{}; + +TEST_P(UpDownCounterToSumFixture, Double) { + bool is_matching_view = GetParam(); MeterProvider mp; auto m = mp.GetMeter("meter1", "version1", "schema1"); std::string instrument_name = "updowncounter1"; @@ -133,13 +137,16 @@ TEST(UpDownCounterToSum, Double) std::shared_ptr reader{new MockMetricReader(std::move(exporter))}; mp.AddMetricReader(reader); - std::unique_ptr view{ - new View("view1", "view1_description", instrument_unit, AggregationType::kSum)}; - std::unique_ptr instrument_selector{ - new InstrumentSelector(InstrumentType::kUpDownCounter, instrument_name, instrument_unit)}; - std::unique_ptr meter_selector{new MeterSelector("meter1", "version1", "schema1")}; - mp.AddView(std::move(instrument_selector), std::move(meter_selector), std::move(view)); - + if (is_matching_view) + { + std::unique_ptr view{ + new View("view1", "view1_description", instrument_unit, AggregationType::kSum)}; + std::unique_ptr instrument_selector{ + new InstrumentSelector(InstrumentType::kUpDownCounter, instrument_name, instrument_unit)}; + std::unique_ptr meter_selector{ + new MeterSelector("meter1", "version1", "schema1")}; + mp.AddView(std::move(instrument_selector), std::move(meter_selector), std::move(view)); + } auto h = m->CreateDoubleUpDownCounter(instrument_name, instrument_desc, instrument_unit); h->Add(5, {}); @@ -168,4 +175,7 @@ TEST(UpDownCounterToSum, Double) const auto &actual = actuals.at(0); ASSERT_EQ(15.0, opentelemetry::nostd::get(actual.value_)); } +INSTANTIATE_TEST_SUITE_P(UpDownCounterToSum, + UpDownCounterToSumFixture, + ::testing::Values(true, false)); #endif