From 54b1398d037706fe8f7f41e709ef75821028cfa5 Mon Sep 17 00:00:00 2001 From: Punya Biswal Date: Sun, 24 Sep 2023 08:41:28 -0400 Subject: [PATCH] [exporters/prometheus] Format --- exporters/prometheus/src/collector.cc | 1 - exporters/prometheus/test/exporter_utils_test.cc | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/exporters/prometheus/src/collector.cc b/exporters/prometheus/src/collector.cc index e444364b6a..d0ef9b0fc6 100644 --- a/exporters/prometheus/src/collector.cc +++ b/exporters/prometheus/src/collector.cc @@ -4,7 +4,6 @@ #include "opentelemetry/exporters/prometheus/collector.h" #include "opentelemetry/sdk/common/global_log_handler.h" - OPENTELEMETRY_BEGIN_NAMESPACE namespace metric_sdk = sdk::metrics; diff --git a/exporters/prometheus/test/exporter_utils_test.cc b/exporters/prometheus/test/exporter_utils_test.cc index 91f190e605..7d803c01e0 100644 --- a/exporters/prometheus/test/exporter_utils_test.cc +++ b/exporters/prometheus/test/exporter_utils_test.cc @@ -11,8 +11,8 @@ OPENTELEMETRY_BEGIN_NAMESPACE using exporter::metrics::TranslateToPrometheus; -namespace metric_sdk = sdk::metrics; -namespace metric_api = metrics; +namespace metric_sdk = sdk::metrics; +namespace metric_api = metrics; template void assert_basic(::prometheus::MetricFamily &metric, @@ -104,8 +104,7 @@ TEST(PrometheusExporterUtils, TranslateToPrometheusIntegerCounter) auto metric1 = translated[0]; std::vector vals = {10}; - assert_basic(metric1, "library_name", "description", ::prometheus::MetricType::Counter, 1, - vals); + assert_basic(metric1, "library_name", "description", ::prometheus::MetricType::Counter, 1, vals); } TEST(PrometheusExporterUtils, TranslateToPrometheusIntegerLastValue) @@ -118,8 +117,7 @@ TEST(PrometheusExporterUtils, TranslateToPrometheusIntegerLastValue) auto metric1 = translated[0]; std::vector vals = {10}; - assert_basic(metric1, "library_name", "description", ::prometheus::MetricType::Gauge, 1, - vals); + assert_basic(metric1, "library_name", "description", ::prometheus::MetricType::Gauge, 1, vals); } TEST(PrometheusExporterUtils, TranslateToPrometheusHistogramNormal) @@ -132,8 +130,7 @@ TEST(PrometheusExporterUtils, TranslateToPrometheusHistogramNormal) auto metric = translated[0]; std::vector vals = {3, 900.5, 4}; - assert_basic(metric, "library_name", "description", ::prometheus::MetricType::Histogram, 1, - vals); + assert_basic(metric, "library_name", "description", ::prometheus::MetricType::Histogram, 1, vals); assert_histogram(metric, std::list{10.1, 20.2, 30.2}, {200, 300, 400, 500}); }