Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d6de3b9
Save work
jmacd Jul 28, 2025
87dd799
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Jul 28, 2025
6f85cfc
memory queue
jmacd Jul 28, 2025
02e1542
oko ok
jmacd Jul 28, 2025
da8eb04
restore unrelated
jmacd Jul 29, 2025
edc0344
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Jul 29, 2025
442e579
QUEUE
jmacd Jul 29, 2025
bafd2fa
remove one
jmacd Jul 29, 2025
85f422d
really revert batchprocessor
jmacd Jul 29, 2025
b063f2c
bp again
jmacd Jul 29, 2025
e63a8da
we're back
jmacd Jul 29, 2025
885b159
revert two
jmacd Jul 29, 2025
c9fea4c
growl backwards
jmacd Jul 30, 2025
eee8fa7
restore
jmacd Jul 30, 2025
1943bf1
cap
jmacd Jul 30, 2025
5d9f023
simpler bp
jmacd Jul 30, 2025
376ff58
freeze
jmacd Jul 30, 2025
a55408f
script
jmacd Jul 30, 2025
2d84427
despair
jmacd Jul 30, 2025
aa1d320
print shutdown
jmacd Jul 30, 2025
63e3073
halp!
jmacd Jul 30, 2025
6931e59
sync
jmacd Jul 31, 2025
34d4fda
tidy it
jmacd Aug 1, 2025
c1b410c
yes
jmacd Aug 1, 2025
c7bc393
loose file
jmacd Aug 1, 2025
c74bbbc
tidy
jmacd Aug 1, 2025
51edd99
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Aug 6, 2025
9c6b772
test cleanup
jmacd Aug 6, 2025
cb940e8
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Aug 19, 2025
52a1b63
tidy
jmacd Aug 19, 2025
12df2ac
go.mod replace
jmacd Aug 19, 2025
943cb7a
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Sep 22, 2025
14d9af7
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Oct 15, 2025
56f0abe
update ref #14038
jmacd Oct 15, 2025
95c6c60
feature names
jmacd Oct 15, 2025
4564002
README
jmacd Oct 15, 2025
fd11c7c
lint
jmacd Oct 16, 2025
1a2a574
gogen
jmacd Oct 16, 2025
b0f1032
chlog
jmacd Oct 16, 2025
ca17ab4
lint
jmacd Oct 16, 2025
197c99b
loosen one test
jmacd Oct 16, 2025
c46f3e8
looser a bit
jmacd Oct 16, 2025
2174afc
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Oct 16, 2025
561ce65
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Dec 5, 2025
42639ae
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Jan 26, 2026
86f6d44
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Jan 28, 2026
18b2b59
generate
jmacd Jan 28, 2026
23445f2
crosslink
jmacd Jan 29, 2026
695d1b8
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Jan 29, 2026
6c049ba
Upstream/crosslink
jmacd Jan 29, 2026
bc9a0b9
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Feb 3, 2026
420d989
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Mar 26, 2026
4bd69b3
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
jmacd Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .chloggen/batchprocessor-exporterhelper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
change_type: enhancement

component: processor/batch

note: batch processor implemented by exporterhelper behind feature flags

issues: [13582]

subtext: |
there are two feature gates:
- processor.batch.useExporterHelper: use the new implementation
- processor.batch.propagateErrors: return errors, implies backpressure
new features are functional however the processor produces exporter metrics,
see https://github.com/open-telemetry/opentelemetry-collector/issues/14038

change_logs: [user]
18 changes: 18 additions & 0 deletions processor/batchprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,21 @@ metadata-key values.

The number of batch processors currently in use is exported as the
`otelcol_processor_batch_metadata_cardinality` metric.

## Modernization feature gates
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


There are two feature gates currently defined for this component,
which we are in the processor of modernizing.

- `processor.batch.useExporterHelper`: Use the new exporterhelper-based QueueBatch logic, the same logic used in all exporters
- `processor.batch.propagateErrors`: Sets the exporterhelper's `WaitForResult` to true, making it delay in order to return errors from the pipeline

This mode is currently behind a feature gate and still experimental,
mainly because metrics emitted by the component are incorrectly named.
At present, when the exporterhelper mode is used, the component emits
exporter metrics. See [#14038](https://github.com/open-telemetry/opentelemetry-collector/issues/14038).

As we move towards finalizing these feature gates, it would be reasonable
Copy link
Copy Markdown

@JakeDern JakeDern Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think porting these features back to batch processor is great! One question I have is: How detrimental is/isn't it to be using both of these components at the same time in the same pipeline once this is all complete?

The reason I ask is that today we are using both the batch processor and the exporter helper in all of our pipelines, because much of this was set up long ago and we don't rely on the batching capabilities of exporterhelper. As these converge in implementation, I wonder how many people will be left with similar/identical batching capability configured across both by mistake.

If this is prone to misuse in any way, I wonder if we can detect it and warn in the logs since exporterhelper and batch processor are well-known core components.

to enable at least one more feature of the underlying QueueBatch logic,
the `num_consumers` parameter which is currently set to 1 can be raised
to enable concurrent-batching behavior.
14 changes: 7 additions & 7 deletions processor/batchprocessor/batch_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ type batch[T any] interface {
}

// newBatchProcessor returns a new batch processor component.
func newBatchProcessor[T any](set processor.Settings, cfg *Config, batchFunc func() batch[T]) (*batchProcessor[T], error) {
func newBatchProcessor[T any](_ context.Context, set processor.Settings, cfg *Config, batchFunc func() batch[T]) (*batchProcessor[T], error) {
// use lower-case, to be consistent with http/2 headers.
mks := make([]string, len(cfg.MetadataKeys))
for i, k := range cfg.MetadataKeys {
Expand Down Expand Up @@ -376,8 +376,8 @@ type tracesBatchProcessor struct {
}

// newTracesBatchProcessor creates a new batch processor that batches traces by size or with timeout
func newTracesBatchProcessor(set processor.Settings, next consumer.Traces, cfg *Config) (processor.Traces, error) {
bp, err := newBatchProcessor(set, cfg, func() batch[ptrace.Traces] { return newBatchTraces(next) })
func newTracesBatchProcessor(ctx context.Context, set processor.Settings, next consumer.Traces, cfg *Config) (processor.Traces, error) {
bp, err := newBatchProcessor(ctx, set, cfg, func() batch[ptrace.Traces] { return newBatchTraces(next) })
if err != nil {
return nil, err
}
Expand All @@ -394,8 +394,8 @@ type metricsBatchProcessor struct {
}

// newMetricsBatchProcessor creates a new batch processor that batches metrics by size or with timeout
func newMetricsBatchProcessor(set processor.Settings, next consumer.Metrics, cfg *Config) (processor.Metrics, error) {
bp, err := newBatchProcessor(set, cfg, func() batch[pmetric.Metrics] { return newMetricsBatch(next) })
func newMetricsBatchProcessor(ctx context.Context, set processor.Settings, next consumer.Metrics, cfg *Config) (processor.Metrics, error) {
bp, err := newBatchProcessor(ctx, set, cfg, func() batch[pmetric.Metrics] { return newMetricsBatch(next) })
if err != nil {
return nil, err
}
Expand All @@ -413,8 +413,8 @@ type logsBatchProcessor struct {
}

// newLogsBatchProcessor creates a new batch processor that batches logs by size or with timeout
func newLogsBatchProcessor(set processor.Settings, next consumer.Logs, cfg *Config) (processor.Logs, error) {
bp, err := newBatchProcessor(set, cfg, func() batch[plog.Logs] { return newBatchLogs(next) })
func newLogsBatchProcessor(ctx context.Context, set processor.Settings, next consumer.Logs, cfg *Config) (processor.Logs, error) {
bp, err := newBatchProcessor(ctx, set, cfg, func() batch[plog.Logs] { return newBatchLogs(next) })
if err != nil {
return nil, err
}
Expand Down
Loading
Loading