@@ -20,8 +20,6 @@ import (
20
20
"go.opentelemetry.io/collector/exporter/internal/queue"
21
21
)
22
22
23
- const defaultQueueSize = 1000
24
-
25
23
// QueueConfig defines configuration for queueing batches before sending to the consumerSender.
26
24
type QueueConfig struct {
27
25
// Enabled indicates whether to not enqueue batches before sending to the consumerSender.
@@ -32,6 +30,9 @@ type QueueConfig struct {
32
30
NumConsumers int `mapstructure:"num_consumers"`
33
31
// QueueSize is the maximum number of batches allowed in queue at a given time.
34
32
QueueSize int `mapstructure:"queue_size"`
33
+ // Blocking controls the queue behavior when full.
34
+ // If true it blocks until enough space to add the new request to the queue.
35
+ Blocking bool `mapstructure:"blocking"`
35
36
// StorageID if not empty, enables the persistent storage and uses the component specified
36
37
// as a storage extension for the persistent queue
37
38
StorageID * component.ID `mapstructure:"storage"`
@@ -45,7 +46,8 @@ func NewDefaultQueueConfig() QueueConfig {
45
46
// By default, batches are 8192 spans, for a total of up to 8 million spans in the queue
46
47
// This can be estimated at 1-4 GB worth of maximum memory usage
47
48
// This default is probably still too high, and may be adjusted further down in a future release
48
- QueueSize : defaultQueueSize ,
49
+ QueueSize : 1_000 ,
50
+ Blocking : false ,
49
51
}
50
52
}
51
53
0 commit comments