-
Notifications
You must be signed in to change notification settings - Fork 601
Small improvements to PeriodicReader #2421
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
Small improvements to PeriodicReader #2421
Conversation
Codecov ReportAttention: Patch coverage is
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. |
| .send(Message::Shutdown(response_tx)) | ||
| .map_err(|e| MetricError::Other(e.to_string()))?; | ||
|
|
||
| if let Ok(response) = response_rx.recv() { |
There was a problem hiding this comment.
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.
lalitb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Removed
Mutexwrapping the channel, as channel.send/receive requires shared ref only.Explicitly handle all outcome on try_recv.
Slightly improved internal logging.