Skip to content

Commit

Permalink
metrics warnings (open-telemetry#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo authored and yxue committed Dec 5, 2022
1 parent 881fa06 commit 8428126
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sdk/include/opentelemetry/sdk/metrics/instruments.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#pragma once
#ifndef ENABLE_METRICS_PREVIEW
# include <functional>
# include "opentelemetry/common/macros.h"
# include "opentelemetry/sdk/common/attribute_utils.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
Expand Down Expand Up @@ -61,7 +62,7 @@ struct InstrumentDescriptor

using MetricAttributes = opentelemetry::sdk::common::OrderedAttributeMap;
using AggregationTemporalitySelector = std::function<AggregationTemporality(InstrumentType)>;
static InstrumentClass GetInstrumentClass(InstrumentType type)
OPENTELEMETRY_MAYBE_UNUSED static InstrumentClass GetInstrumentClass(InstrumentType type)
{
if (type == InstrumentType::kCounter || type == InstrumentType::kHistogram ||
type == InstrumentType::kUpDownCounter)
Expand Down
1 change: 0 additions & 1 deletion sdk/test/metrics/async_metric_storage_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ TEST_P(WritableMetricStorageTestFixture, TestAggregation)
std::shared_ptr<CollectorHandle> collector(new MockCollectorHandle(temporality));
std::vector<std::shared_ptr<CollectorHandle>> collectors;
collectors.push_back(collector);
size_t count_attributes = 0;

std::unique_ptr<AttributesProcessor> default_attributes_processor{
new DefaultAttributesProcessor{}};
Expand Down
1 change: 0 additions & 1 deletion sdk/test/metrics/metric_reader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class MockMetricReader : public MetricReader

TEST(MetricReaderTest, BasicTests)
{
AggregationTemporality aggr_temporality = AggregationTemporality::kDelta;
std::unique_ptr<MetricReader> metric_reader1(new MockMetricReader());
EXPECT_EQ(metric_reader1->GetAggregationTemporality(InstrumentType::kCounter),
AggregationTemporality::kCumulative);
Expand Down

0 comments on commit 8428126

Please sign in to comment.