Skip to content

Warning with DoubleUpDownCounter and negative values in 1.12.0 #2377

@timwoj

Description

@timwoj

Describe your environment
otel-cpp: v1.12.0
Platform: macOS (but happens on others as well)

Steps to reproduce

  • Create a DoubleUpDownCounter
  • Add a negative value to it

What is the expected behavior?
The counter's value is decremented by the value.

What is the actual behavior?

[Warning] File: /Users/tim/Desktop/projects/opentelemetry-cpp/sdk/src/metrics/aggregation/sum_aggregation.cc:90  DoubleSumAggregation::Aggregate Negative value ignored for Monotonic increasing measurement. Value-374.1

Additional context
Attached is a patch for the metrics_simple example that exhibits the problem.

updown.patch

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions