Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: Add experimental concurrent processor for logs #2780
feat: Add experimental concurrent processor for logs #2780
Changes from 3 commits
0369dbe
5871538
a5ef65d
3fb7d49
967ea29
fe5f455
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 24 in opentelemetry-sdk/src/logs/concurrent_log_processor.rs
opentelemetry-sdk/src/logs/concurrent_log_processor.rs#L22-L24
Check warning on line 31 in opentelemetry-sdk/src/logs/concurrent_log_processor.rs
opentelemetry-sdk/src/logs/concurrent_log_processor.rs#L28-L31
Check warning on line 38 in opentelemetry-sdk/src/logs/concurrent_log_processor.rs
opentelemetry-sdk/src/logs/concurrent_log_processor.rs#L33-L38
Check warning on line 42 in opentelemetry-sdk/src/logs/concurrent_log_processor.rs
opentelemetry-sdk/src/logs/concurrent_log_processor.rs#L40-L42
Check warning on line 52 in opentelemetry-sdk/src/logs/concurrent_log_processor.rs
opentelemetry-sdk/src/logs/concurrent_log_processor.rs#L45-L52
Check warning on line 146 in opentelemetry-sdk/src/logs/simple_log_processor.rs
opentelemetry-sdk/src/logs/simple_log_processor.rs#L146
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.
Wondering why
true
is returned to enable events if the exporter cannot be locked?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.
Good point! Not sure what is the right behavior here.
Since
true
is the default, I opted fortrue
. It can be argued that if the lock got poisoned, no logs can be exported anyway, so returning false also is valid.Good to revisit this. I'll probably revisit the need of Mutex lock in SimpleLogProcessor, and use atomics to achieve the goal is ensuring one export() is active at a time. With that, we won't face the lock poison issue.