-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Remove old push based batcher #12233
Closed
bogdandrutu
wants to merge
1
commit into
open-telemetry:main
from
bogdandrutu:rm-old-push-based-batcher
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: deprecation | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) | ||
component: exporterhelerp | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Deprecate alpha featuregate "exporter.UsePullingBasedExporterQueueBatcher". Functionality is enabled by default. | ||
|
||
# One or more tracking issues or pull requests related to the change | ||
issues: [12233] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | ||
|
||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [user] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,11 +25,12 @@ import ( | |
"go.opentelemetry.io/collector/pipeline" | ||
) | ||
|
||
var usePullingBasedExporterQueueBatcher = featuregate.GlobalRegistry().MustRegister( | ||
var _ = featuregate.GlobalRegistry().MustRegister( | ||
"exporter.UsePullingBasedExporterQueueBatcher", | ||
featuregate.StageBeta, | ||
featuregate.StageDeprecated, | ||
featuregate.WithRegisterFromVersion("v0.115.0"), | ||
featuregate.WithRegisterDescription("if set to true, turns on the pulling-based exporter queue bathcer"), | ||
featuregate.WithRegisterToVersion("v0.119.0"), | ||
featuregate.WithRegisterDescription("If set to true, turns on the pulling-based exporter queue bathcer"), | ||
) | ||
|
||
type ObsrepSenderFactory = func(obsrep *ObsReport) Sender[internal.Request] | ||
|
@@ -53,7 +54,6 @@ type BaseExporter struct { | |
// Chain of senders that the exporter helper applies before passing the data to the actual exporter. | ||
// The data is handled by each sender in the respective order starting from the queueSender. | ||
// Most of the senders are optional, and initialized with a no-op path-through sender. | ||
BatchSender Sender[internal.Request] | ||
QueueSender Sender[internal.Request] | ||
ObsrepSender Sender[internal.Request] | ||
RetrySender Sender[internal.Request] | ||
|
@@ -73,7 +73,6 @@ func NewBaseExporter(set exporter.Settings, signal pipeline.Signal, osf ObsrepSe | |
} | ||
|
||
be := &BaseExporter{ | ||
BatchSender: &BaseSender[internal.Request]{}, | ||
QueueSender: &BaseSender[internal.Request]{}, | ||
ObsrepSender: osf(obsReport), | ||
RetrySender: &BaseSender[internal.Request]{}, | ||
|
@@ -101,23 +100,8 @@ func NewBaseExporter(set exporter.Settings, signal pipeline.Signal, osf ObsrepSe | |
be.QueueSender = NewQueueSender(q, be.Set, be.queueCfg.NumConsumers, be.ExportFailureMessage, be.Obsrep, be.BatcherCfg) | ||
} | ||
|
||
if !usePullingBasedExporterQueueBatcher.IsEnabled() && be.BatcherCfg.Enabled || | ||
usePullingBasedExporterQueueBatcher.IsEnabled() && be.BatcherCfg.Enabled && !be.queueCfg.Enabled { | ||
bs := NewBatchSender(be.BatcherCfg, be.Set) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even with the feature gate set to Stable, we still have this condition |
||
be.BatchSender = bs | ||
} | ||
|
||
be.connectSenders() | ||
|
||
if bs, ok := be.BatchSender.(*BatchSender); ok { | ||
// If queue sender is enabled assign to the batch sender the same number of workers. | ||
if qs, ok := be.QueueSender.(*QueueSender); ok { | ||
bs.concurrencyLimit = int64(qs.numConsumers) | ||
} | ||
// Batcher sender mutates the data. | ||
be.ConsumerOptions = append(be.ConsumerOptions, consumer.WithCapabilities(consumer.Capabilities{MutatesData: true})) | ||
} | ||
|
||
return be, nil | ||
} | ||
|
||
|
@@ -133,8 +117,7 @@ func (be *BaseExporter) Send(ctx context.Context, req internal.Request) error { | |
|
||
// connectSenders connects the senders in the predefined order. | ||
func (be *BaseExporter) connectSenders() { | ||
be.QueueSender.SetNextSender(be.BatchSender) | ||
be.BatchSender.SetNextSender(be.ObsrepSender) | ||
be.QueueSender.SetNextSender(be.ObsrepSender) | ||
be.ObsrepSender.SetNextSender(be.RetrySender) | ||
be.RetrySender.SetNextSender(be.TimeoutSender) | ||
} | ||
|
@@ -145,11 +128,6 @@ func (be *BaseExporter) Start(ctx context.Context, host component.Host) error { | |
return err | ||
} | ||
|
||
// If no error then start the BatchSender. | ||
if err := be.BatchSender.Start(ctx, host); err != nil { | ||
return err | ||
} | ||
|
||
// Last start the queueSender. | ||
return be.QueueSender.Start(ctx, host) | ||
} | ||
|
@@ -158,8 +136,6 @@ func (be *BaseExporter) Shutdown(ctx context.Context) error { | |
return multierr.Combine( | ||
// First shutdown the retry sender, so the queue sender can flush the queue without retries. | ||
be.RetrySender.Shutdown(ctx), | ||
// Then shutdown the batch sender | ||
be.BatchSender.Shutdown(ctx), | ||
// Then shutdown the queue sender. | ||
be.QueueSender.Shutdown(ctx), | ||
// Last shutdown the wrapped exporter itself. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In the previous release was alpha, turned to beta in this release. Decided to remove this sooner, since we want to complete the exportehelper this cycle.
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.
Why Deprecated, not Stable?
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.
Because it was alpha:
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.
But this feature hasn't proved unworkable. We still want to proceed with this, right?