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

Metrics warnings #1583

Merged
merged 2 commits into from
Aug 28, 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
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