-
Notifications
You must be signed in to change notification settings - Fork 602
feat: Add experimental concurrent processor for logs #2780
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2780 +/- ##
=======================================
- Coverage 79.7% 79.6% -0.1%
=======================================
Files 123 124 +1
Lines 23136 23174 +38
=======================================
+ Hits 18448 18456 +8
- Misses 4688 4718 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
| if let Ok(exporter) = self.exporter.lock() { | ||
| exporter.event_enabled(level, target, name) | ||
| } else { | ||
| true |
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 for true. 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.
event_enabled. This addresses that also, as it was required to run stress test comparison. Can do this in a separate PR it helps review easier.Spec discussion:
open-telemetry/opentelemetry-specification#4231