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

[WIP] BatchSpanProcessor with dedicated thread. #2456

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Dec 19, 2024

Fixes #2454
Design discussion issue (if applicable) #

Changes

WIP, tentative ready by Friday eod. changes consistent with #2436

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@lalitb lalitb requested a review from a team as a code owner December 19, 2024 10:09
@lalitb lalitb marked this pull request as draft December 19, 2024 10:09
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 83.45070% with 94 lines in your changes missing coverage. Please review.

Project coverage is 77.0%. Comparing base (6209c06) to head (3feaddc).

Files with missing lines Patch % Lines
...sdk/src/trace/span_processor_with_async_runtime.rs 81.5% 60 Missing ⚠️
opentelemetry-sdk/src/trace/span_processor.rs 89.2% 25 Missing ⚠️
opentelemetry-sdk/src/trace/runtime_tests.rs 0.0% 5 Missing ⚠️
opentelemetry-sdk/src/trace/provider.rs 0.0% 2 Missing ⚠️
opentelemetry-zipkin/src/exporter/mod.rs 0.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2456     +/-   ##
=======================================
+ Coverage   76.9%   77.0%   +0.1%     
=======================================
  Files        123     124      +1     
  Lines      22581   22843    +262     
=======================================
+ Hits       17379   17609    +230     
- Misses      5202    5234     +32     

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

@lalitb lalitb requested a review from Copilot December 20, 2024 04:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

opentelemetry-sdk/src/trace/span_processor.rs Outdated Show resolved Hide resolved
.recv_timeout(self.shutdown_timeout)
.map_err(|_| TraceError::ExportTimedOut(self.shutdown_timeout))?;
if let Some(handle) = self.handle.lock().unwrap().take() {
handle.join().expect("Failed to join thread");
Copy link
Preview

Copilot AI Dec 20, 2024

Choose a reason for hiding this comment

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

Using unwrap on the mutex lock can potentially panic. Consider handling this more gracefully to avoid unexpected panics.

Suggested change
handle.join().expect("Failed to join thread");
handle.join().expect("Failed to join thread after mutex lock");

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Member Author

Choose a reason for hiding this comment

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

Nice to have these basic issues getting caught :)

@lalitb
Copy link
Member Author

lalitb commented Dec 22, 2024

most stuff should work, apart from integration tests. Will be looking into it. Will make this ready for review after that.

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.

BatchProcessing for Spans should use own thread by default
1 participant