filestorage

package
v0.47.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 13 Imported by: 9

README

File Storage

🚧 This extension is in alpha. Configuration and functionality are subject to change.

The File Storage extension can persist state to the local file system.

The extension requires read and write access to a directory. A default directory can be used, but it must already exist in order for the extension to operate.

directory is the relative or absolute path to the dedicated data storage directory. The default directory is %ProgramData%\Otelcol\FileStorage on Windows and /var/lib/otelcol/file_storage otherwise.

timeout is the maximum time to wait for a file lock. This value does not need to be modified in most circumstances. The default timeout is 1s.

compaction defines how and when files should be compacted. For now only compaction on start of the collector is supported, and can be enabled by compaction.on_start option.

compaction.directory is the directory used for compaction (as midstep).

compaction.max_transaction_size defines maximum size of the compaction transaction. A value of zero will ignore transaction sizes.

extensions:
  file_storage:
  file_storage/all_settings:
    directory: /var/lib/otelcol/mydir
    timeout: 1s
    compaction:
      on_start: true
      directory: /tmp/
      max_transaction_size: 65_536

service:
  extensions: [file_storage, file_storage/all_settings]
  pipelines:
    traces:
      receivers: [nop]
      processors: [nop]
      exporters: [nop]

# Data pipeline is required to load the config.
receivers:
  nop:
processors:
  nop:
exporters:
  nop:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ExtensionFactory

NewFactory creates a factory for HostObserver extension.

Types

type CompactionConfig added in v0.45.0

type CompactionConfig struct {
	OnStart            bool   `mapstructure:"on_start,omitempty"`
	Directory          string `mapstructure:"directory,omitempty"`
	MaxTransactionSize int64  `mapstructure:"max_transaction_size,omitempty"`
}

type Config

type Config struct {
	config.ExtensionSettings `mapstructure:",squash"`

	Directory string        `mapstructure:"directory,omitempty"`
	Timeout   time.Duration `mapstructure:"timeout,omitempty"`

	Compaction *CompactionConfig `mapstructure:"compaction,omitempty"`
}

Config defines configuration for http forwarder extension.

func (*Config) Validate added in v0.41.0

func (cfg *Config) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL