-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[exporter] exporter queue Read() #11396
[exporter] exporter queue Read() #11396
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11396 +/- ##
=======================================
Coverage 92.14% 92.14%
=======================================
Files 432 432
Lines 20297 20296 -1
=======================================
Hits 18702 18702
+ Misses 1232 1231 -1
Partials 363 363 ☔ View full report in Codecov by Sentry. |
5834f7a
to
95adb3d
Compare
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.
Overall LGTM on the new API
4d78360
to
3a42e45
Compare
7217432
to
bfee648
Compare
bfee648
to
145d901
Compare
consumeErr := qc.consumeFunc(ctx, req) | ||
qc.queue.OnProcessingFinished(index, consumeErr) |
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.
consumeErr := qc.consumeFunc(ctx, req) | |
qc.queue.OnProcessingFinished(index, consumeErr) | |
qc.queue.OnProcessingFinished(index, qc.consumeFunc(ctx, req)) |
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds a public function `GetNextItem` to queue (both persistent queue and bounded memory queue) Why this change? Instead of blocking until consumption of the item is done, we would like to separate the API for reading and committing consumption. Before: `Consume(consumeFunc)` After: `idx, item = Read()` `OnProcessingFinished(idx)` <!-- Issue number if applicable --> #### Link to tracking issue open-telemetry#8122 open-telemetry#10368 <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.-->
Description
This PR adds a public function
GetNextItem
to queue (both persistent queue and bounded memory queue)Why this change?
Instead of blocking until consumption of the item is done, we would like to separate the API for reading and committing consumption.
Before:
Consume(consumeFunc)
After:
idx, item = Read()
OnProcessingFinished(idx)
Link to tracking issue
#8122
#10368
Testing
Documentation