Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compiler warnings #1499

Merged
merged 2 commits into from
Jul 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class AttributesProcessor
// @returns The processed attributes
virtual MetricAttributes process(
const opentelemetry::common::KeyValueIterable &attributes) const noexcept = 0;
virtual ~AttributesProcessor() = default;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/metrics/metric_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion sdk/src/metrics/state/sync_metric_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ bool SyncMetricStorage::Collect(CollectorHandle *collector,
nostd::function_ref<bool(MetricData)> 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
Expand Down
2 changes: 0 additions & 2 deletions sdk/test/metrics/async_metric_storage_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ TEST_P(WritableMetricStorageTestFixture, TestAggregation)
std::vector<std::shared_ptr<CollectorHandle>> collectors;
collectors.push_back(collector);
size_t count_attributes = 0;
long value = 0;

MeasurementFetcher measurement_fetcher;
opentelemetry::sdk::metrics::AsyncMetricStorage<long> storage(instr_desc, AggregationType::kSum,
MeasurementFetcher::Fetcher,
new DefaultAttributesProcessor());
Expand Down