From c9009a0edbb757ba1135ef952ba3fe6b95b3513b Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Mon, 1 Sep 2025 15:02:01 +0100 Subject: [PATCH 1/3] Expose MergeCtx via exporterhelper#QueueBatchSettings --- exporter/exporterhelper/internal/base_exporter.go | 1 + exporter/exporterhelper/internal/queue_sender.go | 1 + 2 files changed, 2 insertions(+) diff --git a/exporter/exporterhelper/internal/base_exporter.go b/exporter/exporterhelper/internal/base_exporter.go index d687a3a88558..0f9c544f17d5 100644 --- a/exporter/exporterhelper/internal/base_exporter.go +++ b/exporter/exporterhelper/internal/base_exporter.go @@ -97,6 +97,7 @@ func NewBaseExporter(set exporter.Settings, signal pipeline.Signal, pusher sende ItemsSizer: be.queueBatchSettings.ItemsSizer, BytesSizer: be.queueBatchSettings.BytesSizer, Partitioner: be.queueBatchSettings.Partitioner, + MergeCtx: be.queueBatchSettings.MergeCtx, } be.QueueSender, err = NewQueueSender(qSet, be.queueCfg, be.ExportFailureMessage, be.firstSender) if err != nil { diff --git a/exporter/exporterhelper/internal/queue_sender.go b/exporter/exporterhelper/internal/queue_sender.go index 6190822f0bcc..ca37f564dead 100644 --- a/exporter/exporterhelper/internal/queue_sender.go +++ b/exporter/exporterhelper/internal/queue_sender.go @@ -21,6 +21,7 @@ type QueueBatchSettings[T any] struct { ItemsSizer request.Sizer[T] BytesSizer request.Sizer[T] Partitioner queuebatch.Partitioner[T] + MergeCtx func(context.Context, context.Context) context.Context } // NewDefaultQueueConfig returns the default config for queuebatch.Config. From f3692e90fcfdfd4cddd4caa67fdfefce97bda96d Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Tue, 2 Sep 2025 15:50:02 +0100 Subject: [PATCH 2/3] Add changelog --- .chloggen/mergectx-queuebatchsettings.yaml | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .chloggen/mergectx-queuebatchsettings.yaml diff --git a/.chloggen/mergectx-queuebatchsettings.yaml b/.chloggen/mergectx-queuebatchsettings.yaml new file mode 100644 index 000000000000..e778d850964d --- /dev/null +++ b/.chloggen/mergectx-queuebatchsettings.yaml @@ -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: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: exporter/exporterhelper + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Expose `MergeCtx` in `exporterhelper#QueueBatchSettings` + +# One or more tracking issues or pull requests related to the change +issues: [13742] + +# (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] From d2b5bcb596c398b96eefedc6da892acf96d1537d Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Wed, 3 Sep 2025 10:43:46 +0100 Subject: [PATCH 3/3] modify changelog note --- .chloggen/mergectx-queuebatchsettings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/mergectx-queuebatchsettings.yaml b/.chloggen/mergectx-queuebatchsettings.yaml index e778d850964d..ddbb907f95b6 100644 --- a/.chloggen/mergectx-queuebatchsettings.yaml +++ b/.chloggen/mergectx-queuebatchsettings.yaml @@ -7,7 +7,7 @@ change_type: enhancement component: exporter/exporterhelper # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Expose `MergeCtx` in `exporterhelper#QueueBatchSettings` +note: Expose `MergeCtx` in exporterhelper's queue batch settings` # One or more tracking issues or pull requests related to the change issues: [13742]