Skip to content

[SDK] Creating DoubleUpDownCounter with no matching view#2379

Merged
marcalff merged 3 commits intoopen-telemetry:mainfrom
lalitb:fix-updowncounter
Oct 19, 2023
Merged

[SDK] Creating DoubleUpDownCounter with no matching view#2379
marcalff merged 3 commits intoopen-telemetry:mainfrom
lalitb:fix-updowncounter

Conversation

@lalitb
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
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