Skip to content

Commit

Permalink
compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Sep 29, 2023
1 parent b6909af commit c511147
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdk/src/metrics/sync_instruments.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
Expand All @@ -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_);
Expand All @@ -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_);
Expand All @@ -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_);
Expand Down

0 comments on commit c511147

Please sign in to comment.