Skip to content

Conversation

@ThomsonTan
Copy link
Contributor

Fixes #2155

Changes

This PR extracts the context related change in #2341, also the change of making LongCounter and LongHistogram as unsigned type is picked up.

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

@ThomsonTan ThomsonTan requested a review from a team November 29, 2023 00:29
@codecov
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Merging #2416 (e05d12f) into main (71d0e50) will decrease coverage by 0.35%.
The diff coverage is 56.33%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2416      +/-   ##
==========================================
- Coverage   87.41%   87.06%   -0.35%     
==========================================
  Files         199      199              
  Lines        6052     6079      +27     
==========================================
+ Hits         5290     5292       +2     
- Misses        762      787      +25     
Files Coverage Δ
api/include/opentelemetry/metrics/noop.h 41.18% <ø> (+3.93%) ⬆️
...i/include/opentelemetry/metrics/sync_instruments.h 100.00% <100.00%> (ø)
...clude/opentelemetry/sdk/metrics/sync_instruments.h 100.00% <ø> (+19.52%) ⬆️
sdk/src/metrics/meter.cc 61.45% <100.00%> (ø)
sdk/src/metrics/sync_instruments.cc 65.84% <53.09%> (-13.05%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. Nicely done.

@marcalff marcalff added the abi:version_2 Fix is available WITH_ABI_VERSION_2 label Nov 29, 2023
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.

@ThomsonTan ThomsonTan changed the title Make context optional for histogram instruments in Metrics SDK [Metrics] Make context optional for histogram instruments in Metrics SDK Nov 29, 2023
@ThomsonTan ThomsonTan merged commit 064fef0 into open-telemetry:main Nov 29, 2023
@ThomsonTan ThomsonTan deleted the MakeContextOptionalForHistogram branch November 29, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abi:version_2 Fix is available WITH_ABI_VERSION_2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Metrics API] The Record method of class Histogram now must have a context param, but in the Add method of class Counter it is optional

3 participants