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 metrics race condition #1552

Merged
merged 5 commits into from
Aug 11, 2022

Conversation

esigo
Copy link
Member

@esigo esigo commented Aug 10, 2022

Fixes #1542 (issue)

Changes

protects reads in aggregations.

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 August 10, 2022 15:33
@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #1552 (88a314b) into main (4cf41c4) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1552      +/-   ##
==========================================
- Coverage   83.35%   83.32%   -0.02%     
==========================================
  Files         156      156              
  Lines        4970     4975       +5     
==========================================
+ Hits         4142     4145       +3     
- Misses        828      830       +2     
Impacted Files Coverage Δ
...ry/sdk/metrics/aggregation/histogram_aggregation.h 90.00% <ø> (ø)
...ry/sdk/metrics/aggregation/lastvalue_aggregation.h 0.00% <ø> (ø)
...elemetry/sdk/metrics/aggregation/sum_aggregation.h 0.00% <ø> (ø)
...k/src/metrics/aggregation/histogram_aggregation.cc 87.76% <100.00%> (+0.26%) ⬆️
...k/src/metrics/aggregation/lastvalue_aggregation.cc 37.50% <100.00%> (+2.02%) ⬆️
sdk/src/metrics/aggregation/sum_aggregation.cc 80.36% <100.00%> (+0.36%) ⬆️
ext/src/http/client/curl/http_client_curl.cc 80.31% <0.00%> (-1.13%) ⬇️
sdk/src/trace/batch_span_processor.cc 91.41% <0.00%> (+0.79%) ⬆️

@ThomsonTan ThomsonTan merged commit 8844771 into open-telemetry:main Aug 11, 2022
@esigo esigo deleted the metrics-race-condition branch August 11, 2022 17:48
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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

race condition in attributes_hashmap_benchmark
3 participants