From c511147b7e650d1dace50a3b8d667edaaeb917b8 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Thu, 28 Sep 2023 22:49:49 -0700 Subject: [PATCH] compile error --- sdk/src/metrics/sync_instruments.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/src/metrics/sync_instruments.cc b/sdk/src/metrics/sync_instruments.cc index 657571dc3d..4a9e2718a0 100644 --- a/sdk/src/metrics/sync_instruments.cc +++ b/sdk/src/metrics/sync_instruments.cc @@ -85,7 +85,7 @@ DoubleCounter::DoubleCounter(InstrumentDescriptor instrument_descriptor, void DoubleCounter::Add(double value, const opentelemetry::common::KeyValueIterable &attributes) noexcept { - if (double < 0) + if (value < 0) { OTEL_INTERNAL_LOG_WARN("[DoubleCounter::Add(V,A)] Value not recorded - negative value for: " << instrument_descriptor_.name_); @@ -105,7 +105,7 @@ void DoubleCounter::Add(double value, const opentelemetry::common::KeyValueIterable &attributes, const opentelemetry::context::Context &context) noexcept { - if (double < 0) + if (value < 0) { OTEL_INTERNAL_LOG_WARN("[DoubleCounter::Add(V,A,C)] Value not recorded - negative value for: " << instrument_descriptor_.name_); @@ -122,7 +122,7 @@ void DoubleCounter::Add(double value, void DoubleCounter::Add(double value) noexcept { - if (double < 0) + if (value < 0) { OTEL_INTERNAL_LOG_WARN("[DoubleCounter::Add(V)] Value not recorded - negative value for: " << instrument_descriptor_.name_); @@ -140,7 +140,7 @@ void DoubleCounter::Add(double value) noexcept void DoubleCounter::Add(double value, const opentelemetry::context::Context &context) noexcept { - if (double < 0) + if (value < 0) { OTEL_INTERNAL_LOG_WARN("[DoubleCounter::Add(V)] Value not recorded - negative value for: " << instrument_descriptor_.name_);