Skip to content

Conversation

@cijothomas
Copy link
Member

Removed Mutex wrapping the channel, as channel.send/receive requires shared ref only.
Explicitly handle all outcome on try_recv.
Slightly improved internal logging.

@cijothomas cijothomas requested a review from a team as a code owner December 12, 2024 15:49
@codecov
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.3%. Comparing base (ce550e3) to head (0154773).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-sdk/src/metrics/periodic_reader.rs 73.3% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2421     +/-   ##
=======================================
- Coverage   79.3%   79.3%   -0.1%     
=======================================
  Files        122     122             
  Lines      21569   21565      -4     
=======================================
- Hits       17114   17110      -4     
  Misses      4455    4455             

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.send(Message::Shutdown(response_tx))
.map_err(|e| MetricError::Other(e.to_string()))?;

if let Ok(response) = response_rx.recv() {
Copy link
Member

Choose a reason for hiding this comment

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

not related - but should this be recv_timeout, to ensure that the main thread doesn't block indefinitely if the collect/export takes too much time? Similar for flush too.

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.

LGTM.

@cijothomas cijothomas merged commit 9b0ccce into open-telemetry:main Dec 13, 2024
20 of 21 checks passed
@cijothomas cijothomas deleted the cijothomas/periodicreader-fix2 branch December 13, 2024 13:44
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.

3 participants