-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement the BatchingProcessor without polling #5107
Conversation
The BatchingProcessor is not expected to ultimately contain configuration fields for queue size or export parameters (see open-telemetry#5093). This will break TestNewBatchingProcessorConfiguration which tests the configuration by evaluating the BatchingProcessor directly. Instead, test the batchingConfig and rename the test to TestNewBatchingConfig to match what is being tested.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5107 +/- ##
=======================================
- Coverage 83.8% 83.8% -0.1%
=======================================
Files 248 248
Lines 16230 16382 +152
=======================================
+ Hits 13602 13729 +127
- Misses 2340 2360 +20
- Partials 288 293 +5
|
sdk/log/batch.go
Outdated
// Cancel all exports and polling. | ||
b.cancel() |
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.
I am not sure why we should cancel pending exports. I think we should still give a chance to have them completed until export timeout is not reached. Cannot this lead to missing log records?
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.
This cancels the context for the polling. This is not the context used in the last flush.
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.
// Cancel all exports and polling. | |
b.cancel() | |
// Cancel all subsequent exports and polling. | |
b.cancel() |
Blocked by #5106 (this includes a cherry-pick of that PRs commit)
The batching log processor provides the base functionality where it batches received records to a configured limit and then exports them. It also provides "polling" functionality where record batches beyond certain time-limit are exported. This change implements the former.
OnEmit
is implemented batch and flush when a full queue is reached. TheForceFlush
andShutdown
methods are implemented to appropriately interact with this functionality.The actual exporting functionality is stubbed until #5104 and #5105 are merged.
The addition of polling is planned for a follow up PR. See #5093 for how this will be extended to include polling.
Part of #5063