diff --git a/sdk/include/opentelemetry/sdk/metrics/view/attributes_processor.h b/sdk/include/opentelemetry/sdk/metrics/view/attributes_processor.h index fdc4e35c53..ebd22b79b4 100644 --- a/sdk/include/opentelemetry/sdk/metrics/view/attributes_processor.h +++ b/sdk/include/opentelemetry/sdk/metrics/view/attributes_processor.h @@ -23,6 +23,7 @@ class AttributesProcessor // @returns The processed attributes virtual MetricAttributes process( const opentelemetry::common::KeyValueIterable &attributes) const noexcept = 0; + virtual ~AttributesProcessor() = default; }; /** diff --git a/sdk/src/metrics/metric_reader.cc b/sdk/src/metrics/metric_reader.cc index c8d6de8967..2f44705e0e 100644 --- a/sdk/src/metrics/metric_reader.cc +++ b/sdk/src/metrics/metric_reader.cc @@ -14,7 +14,7 @@ namespace metrics { MetricReader::MetricReader(AggregationTemporality aggregation_temporality) - : aggregation_temporality_(aggregation_temporality), shutdown_(false), metric_producer_(nullptr) + : metric_producer_(nullptr), aggregation_temporality_(aggregation_temporality), shutdown_(false) {} void MetricReader::SetMetricProducer(MetricProducer *metric_producer) diff --git a/sdk/src/metrics/state/sync_metric_storage.cc b/sdk/src/metrics/state/sync_metric_storage.cc index 8c79f9d7ca..844b187c03 100644 --- a/sdk/src/metrics/state/sync_metric_storage.cc +++ b/sdk/src/metrics/state/sync_metric_storage.cc @@ -18,7 +18,6 @@ bool SyncMetricStorage::Collect(CollectorHandle *collector, nostd::function_ref callback) noexcept { opentelemetry::common::SystemTimestamp last_collection_ts = sdk_start_ts; - auto aggregation_temporarily = collector->GetAggregationTemporality(); // Add the current delta metrics to `unreported metrics stash` for all the collectors, // this will also empty the delta metrics hashmap, and make it available for diff --git a/sdk/test/metrics/async_metric_storage_test.cc b/sdk/test/metrics/async_metric_storage_test.cc index 2be5332a8d..5a51b6eda1 100644 --- a/sdk/test/metrics/async_metric_storage_test.cc +++ b/sdk/test/metrics/async_metric_storage_test.cc @@ -93,9 +93,7 @@ TEST_P(WritableMetricStorageTestFixture, TestAggregation) std::vector> collectors; collectors.push_back(collector); size_t count_attributes = 0; - long value = 0; - MeasurementFetcher measurement_fetcher; opentelemetry::sdk::metrics::AsyncMetricStorage storage(instr_desc, AggregationType::kSum, MeasurementFetcher::Fetcher, new DefaultAttributesProcessor());