-
Notifications
You must be signed in to change notification settings - Fork 979
fix(sdk-logs): Fix Not Exporting Upon _maxExportBatchSize
#5961
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
fix(sdk-logs): Fix Not Exporting Upon _maxExportBatchSize
#5961
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5961 +/- ##
==========================================
- Coverage 95.23% 95.22% -0.01%
==========================================
Files 311 311
Lines 8596 8603 +7
Branches 1799 1801 +2
==========================================
+ Hits 8186 8192 +6
- Misses 410 411 +1
🚀 New features to boost your workflow:
|
trentm
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.
Thanks for taking this on. We definitely should fix the issue.
experimental/packages/sdk-logs/src/export/BatchLogRecordProcessorBase.ts
Show resolved
Hide resolved
|
Marc reminded me that this exporting code originally derives from the batch Span exporter. And there was a PR there doing a similar thing. I haven't looked at it, but this PR might have changes that could be borrowed: #3958 |
trentm
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.
Thanks!
_maxExportBatchSize_maxExportBatchSize
CHANGELOG.md
Outdated
| ### :bug: Bug Fixes | ||
|
|
||
| * fix(sdk-logs): Fix the `batchLogProcessor` exporting only upon `_scheduledDelayMillis` and ignoring `maxExportBatchSize` [#5961](https://github.com/open-telemetry/opentelemetry-js/pull/5961) @jacksonweber | ||
| * test(shim-opentracing): add comparison thresholds in flaky assertions [#5974](https://github.com/open-telemetry/opentelemetry-js/pull/5974) @cjihrig |
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 line shouldn't have been moved. I think this is an accidental mismerge from #5987.
The changelog line for this PR should also be in experimental/CHANGELOG.md rather than this file.
I'll fix in a sec.
Which problem is this PR solving?
This pull request addresses a bug in the log batching processor so that logs are exported immediately when the batch size limit is reached, rather than waiting for the scheduled delay. It also adds and improves tests to ensure the correct export behavior for both full and partial batches, and clarifies the logic for queue size limits.
Bug Fixes and Core Logic:
batchLogProcessorso that it exports logs immediately whenmaxExportBatchSizeis reached, instead of waiting for_scheduledDelayMillis. This ensures timely log delivery and corrects previous batching behavior. [1] [2] [3]Fixes #5706
Type of change
How Has This Been Tested?
BatchLogRecordProcessor.test.tsto cover immediate export on batch size, timer-based export for partial batches, multiple immediate exports, and correct handling of queue size limits. [1] [2]Checklist: