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

BatchLogRecordProcessor's exportCurrentBatch wait for export finish, which limited logData to be exposed. #6287

Open
qixiaogang opened this issue Mar 12, 2024 · 3 comments
Labels
Feature Request Suggest an idea for this project

Comments

@qixiaogang
Copy link

qixiaogang commented Mar 12, 2024

Is your feature request related to a problem? Please describe.
Our application has a high throughput of logData, using BatchLogRecordProcessor as a processor to batch output, we find that throughput is limited and CPU & memory usage are not high. After some investigation, we find that bottleneck is in BatchLogRecordProcessor.

image

BatchLogRecordProcessor has only one work and batch export pending on export result, so throughput is limited.

Describe the solution you'd like
Support multiple worker for BatchLogRecordProcessor, and worker number is configurable.

Describe alternatives you've considered
NA

Additional context
NA

@qixiaogang qixiaogang added the Feature Request Suggest an idea for this project label Mar 12, 2024
@jack-berg
Copy link
Member

BatchSpanProcessor and BatchLogRecordProcessor are intended to synchronously wait for the exporter's CompletableResultCode to complete before continuing. Some options:

  • Write a custom exporter which returns a CompletableResultCode that resolves immediately, allowing the single worker in BatchLogRecordProcessor to achieve higher throughput.
  • Write a custom processor which has multiple workers pulling log records of the queue

@qixiaogang
Copy link
Author

@jack-berg Thanks for the options. and one question, can BatchLogRecordProcessor support multiple workers pulling log records of the queue instead of writing a custom processor.

@jack-berg
Copy link
Member

can BatchLogRecordProcessor support multiple workers pulling log records of the queue instead of writing a custom processor.

No it can't. And it would be difficult to make this happen. For one, the code itself would be tricky to write - its a pretty complex implementation with only a single thread. But because the batch log record processor reflects the spec, we would almost certainly want to see the spec evolved to describe this multi-worker scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

2 participants