Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK] Creating DoubleUpDownCounter with no matching view #2379

Merged
merged 3 commits into from
Oct 19, 2023

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Oct 19, 2023

Fixes #2377

Changes

In case of a matching view, the SDK picks the Aggregation with correct monotonic for DoubleUpDownCounter as here. The problem was in the logic when there is no matching view, which is fixed now. Also added test for this scenario.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@lalitb lalitb requested a review from a team October 19, 2023 07:04
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #2379 (35b7aa8) into main (0e6eae0) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2379   +/-   ##
=======================================
  Coverage   87.43%   87.43%           
=======================================
  Files         199      199           
  Lines        6028     6028           
=======================================
  Hits         5270     5270           
  Misses        758      758           
Files Coverage Δ
...etry/sdk/metrics/aggregation/default_aggregation.h 70.13% <100.00%> (ø)

@marcalff marcalff changed the title Creating DoubleUpDownCounter with no matching view [SDK] Creating DoubleUpDownCounter with no matching view Oct 19, 2023
@marcalff marcalff merged commit d9ad76f into open-telemetry:main Oct 19, 2023
45 checks passed
timwoj pushed a commit to zeek/opentelemetry-cpp that referenced this pull request Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning with DoubleUpDownCounter and negative values in 1.12.0
2 participants