@@ -19,8 +19,8 @@ import (
1919 "go.opentelemetry.io/collector/consumer"
2020 "go.opentelemetry.io/collector/exporter"
2121 "go.opentelemetry.io/collector/exporter/exporterbatcher"
22+ "go.opentelemetry.io/collector/exporter/exporterhelper/internal/request"
2223 "go.opentelemetry.io/collector/exporter/exporterqueue" // BaseExporter contains common fields between different exporter types.
23- "go.opentelemetry.io/collector/exporter/internal"
2424 "go.opentelemetry.io/collector/pipeline"
2525)
2626
@@ -31,8 +31,8 @@ type BaseExporter struct {
3131 component.StartFunc
3232 component.ShutdownFunc
3333
34- Marshaler exporterqueue.Marshaler [internal .Request ]
35- Unmarshaler exporterqueue.Unmarshaler [internal .Request ]
34+ Marshaler exporterqueue.Marshaler [request .Request ]
35+ Unmarshaler exporterqueue.Unmarshaler [request .Request ]
3636
3737 Set exporter.Settings
3838
@@ -42,17 +42,17 @@ type BaseExporter struct {
4242 // Chain of senders that the exporter helper applies before passing the data to the actual exporter.
4343 // The data is handled by each sender in the respective order starting from the queueSender.
4444 // Most of the senders are optional, and initialized with a no-op path-through sender.
45- QueueSender Sender [internal .Request ]
46- ObsrepSender Sender [internal .Request ]
47- RetrySender Sender [internal .Request ]
45+ QueueSender Sender [request .Request ]
46+ ObsrepSender Sender [request .Request ]
47+ RetrySender Sender [request .Request ]
4848
49- firstSender Sender [internal .Request ]
49+ firstSender Sender [request .Request ]
5050
5151 ConsumerOptions []consumer.Option
5252
5353 timeoutCfg TimeoutConfig
5454 retryCfg configretry.BackOffConfig
55- queueFactory exporterqueue.Factory [internal .Request ]
55+ queueFactory exporterqueue.Factory [request .Request ]
5656 queueCfg exporterqueue.Config
5757 batcherCfg exporterbatcher.Config
5858}
@@ -61,7 +61,7 @@ func NewBaseExporter(set exporter.Settings, signal pipeline.Signal, options ...O
6161 be := & BaseExporter {
6262 Set : set ,
6363 timeoutCfg : NewDefaultTimeoutConfig (),
64- queueFactory : exporterqueue .NewMemoryQueueFactory [internal .Request ](),
64+ queueFactory : exporterqueue .NewMemoryQueueFactory [request .Request ](),
6565 }
6666
6767 for _ , op := range options {
@@ -105,7 +105,7 @@ func NewBaseExporter(set exporter.Settings, signal pipeline.Signal, options ...O
105105}
106106
107107// Send sends the request using the first sender in the chain.
108- func (be * BaseExporter ) Send (ctx context.Context , req internal .Request ) error {
108+ func (be * BaseExporter ) Send (ctx context.Context , req request .Request ) error {
109109 // Have to read the number of items before sending the request since the request can
110110 // be modified by the downstream components like the batcher.
111111 itemsCount := req .ItemsCount ()
@@ -206,7 +206,7 @@ func WithQueue(config QueueConfig) Option {
206206 QueueSize : config .QueueSize ,
207207 Blocking : config .Blocking ,
208208 }
209- o .queueFactory = exporterqueue .NewPersistentQueueFactory [internal .Request ](config .StorageID , exporterqueue.PersistentQueueSettings [internal .Request ]{
209+ o .queueFactory = exporterqueue .NewPersistentQueueFactory [request .Request ](config .StorageID , exporterqueue.PersistentQueueSettings [request .Request ]{
210210 Marshaler : o .Marshaler ,
211211 Unmarshaler : o .Unmarshaler ,
212212 })
@@ -218,7 +218,7 @@ func WithQueue(config QueueConfig) Option {
218218// This option should be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter.
219219// Experimental: This API is at the early stage of development and may change without backward compatibility
220220// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
221- func WithRequestQueue (cfg exporterqueue.Config , queueFactory exporterqueue.Factory [internal .Request ]) Option {
221+ func WithRequestQueue (cfg exporterqueue.Config , queueFactory exporterqueue.Factory [request .Request ]) Option {
222222 return func (o * BaseExporter ) error {
223223 if o .Marshaler != nil || o .Unmarshaler != nil {
224224 return errors .New ("WithRequestQueue option must be used with the new request exporters only, use WithQueue instead" )
@@ -257,7 +257,7 @@ func WithBatcher(cfg exporterbatcher.Config) Option {
257257
258258// WithMarshaler is used to set the request marshaler for the new exporter helper.
259259// It must be provided as the first option when creating a new exporter helper.
260- func WithMarshaler (marshaler exporterqueue.Marshaler [internal .Request ]) Option {
260+ func WithMarshaler (marshaler exporterqueue.Marshaler [request .Request ]) Option {
261261 return func (o * BaseExporter ) error {
262262 o .Marshaler = marshaler
263263 return nil
@@ -266,7 +266,7 @@ func WithMarshaler(marshaler exporterqueue.Marshaler[internal.Request]) Option {
266266
267267// WithUnmarshaler is used to set the request unmarshaler for the new exporter helper.
268268// It must be provided as the first option when creating a new exporter helper.
269- func WithUnmarshaler (unmarshaler exporterqueue.Unmarshaler [internal .Request ]) Option {
269+ func WithUnmarshaler (unmarshaler exporterqueue.Unmarshaler [request .Request ]) Option {
270270 return func (o * BaseExporter ) error {
271271 o .Unmarshaler = unmarshaler
272272 return nil
0 commit comments