Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Enabled indicates whether to not enqueue batches before exporting. Enabled bool `mapstructure:"enabled"` // NumConsumers is the number of consumers from the queue. NumConsumers int `mapstructure:"num_consumers"` // QueueSize is the maximum number of requests allowed in queue at any given time. QueueSize int `mapstructure:"queue_size"` }
Config defines configuration for queueing requests before exporting. It's supposed to be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig returns the default Config. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
type Factory ¶
Factory is a function that creates a new queue. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
func NewMemoryQueueFactory ¶
func NewMemoryQueueFactory[T itemsCounter]() Factory[T]
NewMemoryQueueFactory returns a factory to create a new memory queue. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
func NewPersistentQueueFactory ¶
func NewPersistentQueueFactory[T itemsCounter](storageID *component.ID, factorySettings PersistentQueueSettings[T]) Factory[T]
NewPersistentQueueFactory returns a factory to create a new persistent queue. If cfg.StorageID is nil then it falls back to memory queue. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
type Marshaler ¶
Marshaler is a function that can marshal a request into bytes. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
type PersistentQueueConfig ¶
type PersistentQueueConfig struct { Config `mapstructure:",squash"` // StorageID if not empty, enables the persistent storage and uses the component specified // as a storage extension for the persistent queue StorageID *component.ID `mapstructure:"storage"` }
PersistentQueueConfig defines configuration for queueing requests in a persistent storage. The struct is provided to be added in the exporter configuration as one struct under the "sending_queue" key. The exporter helper Go interface requires the fields to be provided separately to WithRequestQueue and NewPersistentQueueFactory. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
type PersistentQueueSettings ¶
type PersistentQueueSettings[T any] struct { // Marshaler is used to serialize queue elements before storing them in the persistent storage. Marshaler Marshaler[T] // Unmarshaler is used to deserialize requests after reading them from the persistent storage. Unmarshaler Unmarshaler[T] }
PersistentQueueSettings defines developer settings for the persistent queue factory. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
type Queue ¶
Queue defines a producer-consumer exchange which can be backed by e.g. the memory-based ring buffer queue (boundedMemoryQueue) or via a disk-based queue (persistentQueue) This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
type Settings ¶
type Settings struct { DataType component.DataType ExporterSettings exporter.CreateSettings }
Settings defines settings for creating a queue.
type Unmarshaler ¶
Unmarshaler is a function that can unmarshal bytes into a request. This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.