@@ -46,7 +46,7 @@ type BaseExporter struct {
46
46
timeoutCfg TimeoutConfig
47
47
retryCfg configretry.BackOffConfig
48
48
49
- queueBatchSettings QueueBatchSettings [request.Request ]
49
+ queueBatchSettings queuebatch. Settings [request.Request ]
50
50
queueCfg queuebatch.Config
51
51
}
52
52
@@ -88,15 +88,11 @@ func NewBaseExporter(set exporter.Settings, signal pipeline.Signal, pusher sende
88
88
}
89
89
90
90
if be .queueCfg .Enabled {
91
- qSet := queuebatch.Settings [request.Request ]{
92
- Signal : signal ,
93
- ID : set .ID ,
94
- Telemetry : set .TelemetrySettings ,
95
- ReferenceCounter : be .queueBatchSettings .ReferenceCounter ,
96
- Encoding : be .queueBatchSettings .Encoding ,
97
- ItemsSizer : be .queueBatchSettings .ItemsSizer ,
98
- BytesSizer : be .queueBatchSettings .BytesSizer ,
99
- Partitioner : be .queueBatchSettings .Partitioner ,
91
+ qSet := queuebatch.AllSettings [request.Request ]{
92
+ Settings : be .queueBatchSettings ,
93
+ Signal : signal ,
94
+ ID : set .ID ,
95
+ Telemetry : set .TelemetrySettings ,
100
96
}
101
97
be .QueueSender , err = NewQueueSender (qSet , be .queueCfg , be .ExportFailureMessage , be .firstSender )
102
98
if err != nil {
@@ -208,14 +204,14 @@ func WithQueue(cfg queuebatch.Config) Option {
208
204
// This option should be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter.
209
205
// Experimental: This API is at the early stage of development and may change without backward compatibility
210
206
// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
211
- func WithQueueBatch (cfg queuebatch.Config , set QueueBatchSettings [request.Request ]) Option {
207
+ func WithQueueBatch (cfg queuebatch.Config , set queuebatch. Settings [request.Request ]) Option {
212
208
return func (o * BaseExporter ) error {
213
209
if ! cfg .Enabled {
214
210
o .ExportFailureMessage += " Try enabling sending_queue to survive temporary failures."
215
211
return nil
216
212
}
217
213
if cfg .StorageID != nil && set .Encoding == nil {
218
- return errors .New ("`QueueBatchSettings .Encoding` must not be nil when persistent queue is enabled" )
214
+ return errors .New ("`Settings .Encoding` must not be nil when persistent queue is enabled" )
219
215
}
220
216
o .queueBatchSettings = set
221
217
o .queueCfg = cfg
@@ -233,9 +229,9 @@ func WithCapabilities(capabilities consumer.Capabilities) Option {
233
229
}
234
230
}
235
231
236
- // WithQueueBatchSettings is used to set the QueueBatchSettings for the new request based exporter helper.
232
+ // WithQueueBatchSettings is used to set the queuebatch.Settings for the new request based exporter helper.
237
233
// It must be provided as the first option when creating a new exporter helper.
238
- func WithQueueBatchSettings (set QueueBatchSettings [request.Request ]) Option {
234
+ func WithQueueBatchSettings (set queuebatch. Settings [request.Request ]) Option {
239
235
return func (o * BaseExporter ) error {
240
236
o .queueBatchSettings = set
241
237
return nil
0 commit comments