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

fix data race on MeterContext::meters_ #1668

Merged
merged 1 commit into from
Oct 9, 2022
Merged

Conversation

esigo
Copy link
Member

@esigo esigo commented Oct 9, 2022

Fixes #1667 (issue)

Changes

adds a lock for reads and writes of MeterContext::meters_.

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

@esigo esigo requested a review from a team October 9, 2022 14:03
@esigo esigo added bug Something isn't working metrics labels Oct 9, 2022
@codecov
Copy link

codecov bot commented Oct 9, 2022

Codecov Report

Merging #1668 (852808e) into main (79a9471) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1668      +/-   ##
==========================================
+ Coverage   84.94%   84.95%   +0.01%     
==========================================
  Files         170      170              
  Lines        5132     5134       +2     
==========================================
+ Hits         4359     4361       +2     
  Misses        773      773              
Impacted Files Coverage Δ
sdk/src/metrics/meter_context.cc 59.10% <100.00%> (+1.95%) ⬆️

@esigo esigo merged commit 7140166 into open-telemetry:main Oct 9, 2022
@esigo esigo deleted the race-1667 branch October 9, 2022 17:01
yxue pushed a commit to yxue/opentelemetry-cpp that referenced this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working metrics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data race on MeterContext::meters_
2 participants