From 02630e0b6d5875625ba85985494a4182b01ed89a Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Sat, 7 May 2022 00:45:44 -0700 Subject: [PATCH] [Metrics SDK] Remove un-necessary files. (#1379) --- .../exporters/ostream/metric_exporter.h | 4 +-- .../sdk/metrics/aggregator/aggregator.h | 24 ----------------- .../sdk/metrics/metric_exporter.h | 2 +- .../opentelemetry/sdk/metrics/recordable.h | 26 ------------------- 4 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 sdk/include/opentelemetry/sdk/metrics/aggregator/aggregator.h delete mode 100644 sdk/include/opentelemetry/sdk/metrics/recordable.h diff --git a/exporters/ostream/include/opentelemetry/exporters/ostream/metric_exporter.h b/exporters/ostream/include/opentelemetry/exporters/ostream/metric_exporter.h index 465ae02bb6..56b6c577b0 100644 --- a/exporters/ostream/include/opentelemetry/exporters/ostream/metric_exporter.h +++ b/exporters/ostream/include/opentelemetry/exporters/ostream/metric_exporter.h @@ -7,11 +7,9 @@ # include # include # include "opentelemetry/common/spin_lock_mutex.h" -# include "opentelemetry/nostd/span.h" # include "opentelemetry/sdk/metrics/data/metric_data.h" # include "opentelemetry/sdk/metrics/instruments.h" # include "opentelemetry/sdk/metrics/metric_exporter.h" -# include "opentelemetry/sdk/metrics/recordable.h" # include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE @@ -28,7 +26,7 @@ class OStreamMetricExporter final : public opentelemetry::sdk::metrics::MetricEx public: /** * Create an OStreamMetricExporter. This constructor takes in a reference to an ostream that the - * export() function will send span data into. + * export() function will send metrics data into. * The default ostream is set to stdout */ explicit OStreamMetricExporter(std::ostream &sout = std::cout) noexcept; diff --git a/sdk/include/opentelemetry/sdk/metrics/aggregator/aggregator.h b/sdk/include/opentelemetry/sdk/metrics/aggregator/aggregator.h deleted file mode 100644 index 416cea5adf..0000000000 --- a/sdk/include/opentelemetry/sdk/metrics/aggregator/aggregator.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -#pragma once -#ifndef ENABLE_METRICS_PREVIEW -# include "opentelemetry/sdk/metrics/aggregation/aggregation.h" -# include "opentelemetry/version.h" -OPENTELEMETRY_BEGIN_NAMESPACE -namespace sdk -{ -namespace metrics -{ -class Aggregator -{}; - -class NoOpAggregator : public Aggregator -{ - // TBD -}; - -} // namespace metrics -} // namespace sdk -OPENTELEMETRY_END_NAMESPACE -#endif \ No newline at end of file diff --git a/sdk/include/opentelemetry/sdk/metrics/metric_exporter.h b/sdk/include/opentelemetry/sdk/metrics/metric_exporter.h index 127ef468ac..3217b83df5 100644 --- a/sdk/include/opentelemetry/sdk/metrics/metric_exporter.h +++ b/sdk/include/opentelemetry/sdk/metrics/metric_exporter.h @@ -29,7 +29,7 @@ class MetricExporter virtual ~MetricExporter() = default; /** - * Exports a batch of metrics recordables. This method must not be called + * Exports a batch of metrics data. This method must not be called * concurrently for the same exporter instance. * @param data metrics data */ diff --git a/sdk/include/opentelemetry/sdk/metrics/recordable.h b/sdk/include/opentelemetry/sdk/metrics/recordable.h deleted file mode 100644 index d7e7f5756e..0000000000 --- a/sdk/include/opentelemetry/sdk/metrics/recordable.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -#pragma once -#ifndef ENABLE_METRICS_PREVIEW -# include "opentelemetry/nostd/string_view.h" -# include "opentelemetry/version.h" - -OPENTELEMETRY_BEGIN_NAMESPACE -namespace sdk -{ -namespace metrics -{ -class Recordable -{ -public: - virtual ~Recordable() = default; - nostd::string_view GetName() { return name_; } - // TBD -private: - nostd::string_view name_; -}; -} // namespace metrics -} // namespace sdk -OPENTELEMETRY_END_NAMESPACE; -#endif