Skip to content

Commit 4736430

Browse files
committed
Enable the new pull-based batcher in exporterhelper
Signed-off-by: Bogdan Drutu <[email protected]>
1 parent 190c4e5 commit 4736430

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

exporter/exporterhelper/internal/batch_sender_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,14 @@ func TestBatchSender_ConcurrencyLimitReached(t *testing.T) {
376376
expectedItems: 51,
377377
},
378378
}
379+
380+
// Why do we not expect the same behavior when usePullingBasedExporterQueueBatcher is true?
381+
// This test checks that when concurrency limit of batch_sender is reached, the batch_sender will flush immediately.
382+
// To avoid blocking, the concurrency limit is set to the number of concurrent goroutines that are in charge of
383+
// reading from the queue and adding to batch. With the new model, we are pulling instead of pushing so we don't
384+
// block the reading goroutine anymore.
385+
defer setFeatureGateForTest(t, usePullingBasedExporterQueueBatcher, false)()
386+
379387
for _, tt := range tests {
380388
t.Run(tt.name, func(t *testing.T) {
381389
qCfg := exporterqueue.NewDefaultConfig()

exporter/exporterhelper/internal/queue_sender.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
var usePullingBasedExporterQueueBatcher = featuregate.GlobalRegistry().MustRegister(
2121
"exporter.UsePullingBasedExporterQueueBatcher",
22-
featuregate.StageAlpha,
22+
featuregate.StageBeta,
2323
featuregate.WithRegisterFromVersion("v0.115.0"),
2424
featuregate.WithRegisterDescription("if set to true, turns on the pulling-based exporter queue bathcer"),
2525
)

0 commit comments

Comments
 (0)