-
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
Restructure Queue to not have to deal with consumers #8828
Conversation
Signed-off-by: Bogdan Drutu <bogdan.drutu@snowflake.com>
|
It's a good idea to move this from queue to the sender 👍 |
go 1.21 | ||
|
||
toolchain go1.21.3 |
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.
Please revert :)
@@ -14,11 +14,11 @@ import ( | |||
"go.opentelemetry.io/collector/exporter/exporterhelper/internal" | |||
) | |||
|
|||
// requestSender is an abstraction of a sender for a request independent of the type of the data (traces, metrics, logs). | |||
// RequestSender is an abstraction of a sender for a request independent of the type of the data (traces, metrics, logs). |
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.
// RequestSender is an abstraction of a sender for a request independent of the type of the data (traces, metrics, logs). | |
// requestSender is an abstraction of a sender for a request independent of the type of the data (traces, metrics, logs). |
// capacity restrictions, returning true upon success and false if no space is currently available. | ||
Offer(item Request) bool | ||
// Poll retrieves and removes the head of this queue. | ||
Poll() <-chan Request |
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.
The name seems a bit confusing, given that it returns a channel. Maybe Chan()
, Out()
or something like that?
Move the common workers loop logic from each queue implementation to the sender. Based on #8828
superseded by #8898 |
Important (read before submitting)
We are currently preparing for the upcoming 1.0 GA release. Pull requests that are not aligned with
the current roadmap https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/roadmap.md
and are not aimed at stabilizing and preparing the Collector for the release will not be accepted.
Delete this paragraph before submitting.
Description: <Describe what has changed.
Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.>
Link to tracking Issue:
Testing: < Describe what testing was performed and which tests were added.>
Documentation: < Describe the documentation added.>
Please delete paragraphs that you did not use before submitting.