Documentation
¶
Overview ¶
Package file provides an otelcol.storage.file component.
Index ¶
- Variables
- type Arguments
- func (args Arguments) Convert(opts component.Options) (otelcomponent.Config, error)
- func (args Arguments) DebugMetricsConfig() otelcolCfg.DebugMetricsArguments
- func (args Arguments) Exporters() map[pipeline.Signal]map[otelcomponent.ID]otelcomponent.Component
- func (args Arguments) ExportsHandler() bool
- func (args Arguments) Extensions() map[otelcomponent.ID]otelcomponent.Component
- func (args *Arguments) SetToDefault()
- func (args *Arguments) Validate() error
- type CompactionConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultConfig = Arguments{ Timeout: time.Second, FSync: false, CreateDirectory: true, DirectoryPermissions: "0750", } )
defaults copied from OpenTelemetry Collector
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct {
// Directory specifies the directory where the file storage will store its data.
Directory string `alloy:"directory,attr,optional"`
// Timeout specifies the timeout for file storage operations.
Timeout time.Duration `alloy:"timeout,attr,optional"`
// Compaction configures file storage compaction.
Compaction *CompactionConfig `alloy:"compaction,block,optional"`
// FSync specifies that fsync should be called after each database write.
FSync bool `alloy:"fsync,attr,optional"`
// CreateDirectory specifies that the directory should be created automatically by the extension on start.
CreateDirectory bool `alloy:"create_directory,attr,optional"`
// DirectoryPermissions specifies the permissions for the directory if it must be created.
DirectoryPermissions string `alloy:"directory_permissions,attr,optional"`
DebugMetrics otelcolCfg.DebugMetricsArguments `alloy:"debug_metrics,block,optional"`
}
Arguments configures the otelcol.file.storage component.
func (Arguments) DebugMetricsConfig ¶
func (args Arguments) DebugMetricsConfig() otelcolCfg.DebugMetricsArguments
DebugMetricsConfig implements extension.Arguments.
func (Arguments) Exporters ¶
func (args Arguments) Exporters() map[pipeline.Signal]map[otelcomponent.ID]otelcomponent.Component
Exporters implements extension.Arguments.
func (Arguments) ExportsHandler ¶
ExportsHandler implements extension.Arguments.
func (Arguments) Extensions ¶
func (args Arguments) Extensions() map[otelcomponent.ID]otelcomponent.Component
Extensions implements extension.Arguments.
func (*Arguments) SetToDefault ¶
func (args *Arguments) SetToDefault()
SetToDefault implements syntax.Defaulter.
type CompactionConfig ¶
type CompactionConfig struct {
// OnStart specifies that compaction is attempted each time on start.
OnStart bool `alloy:"on_start,attr,optional"`
// OnRebound specifies that compaction is attempted online, when rebound conditions are met.
OnRebound bool `alloy:"on_rebound,attr,optional"`
// Directory specifies where the temporary files for compaction will be stored.
Directory string `alloy:"directory,attr,optional"`
// ReboundNeededThresholdMiB specifies the minimum total allocated size (both used and empty)
// to mark the need for online compaction.
ReboundNeededThresholdMiB int64 `alloy:"rebound_needed_threshold_mib,attr,optional"`
// ReboundTriggerThresholdMiB is used when compaction is marked as needed. When used allocated data size drops
// below the specified value, the compaction starts and the flag marking need for compaction is cleared.
ReboundTriggerThresholdMiB int64 `alloy:"rebound_trigger_threshold_mib,attr,optional"`
// MaxTransactionSize specifies the maximum number of items that might be present in a single compaction iteration.
MaxTransactionSize int64 `alloy:"max_transaction_size,attr,optional"`
// CheckInterval specifies the frequency of compaction checks.
CheckInterval time.Duration `alloy:"check_interval,attr,optional"`
// CleanupOnStart specifies that removal of temporary files is performed on start.
CleanupOnStart bool `alloy:"cleanup_on_start,attr,optional"`
}
CompationConfig configures optional file storage compaction.
func (*CompactionConfig) Convert ¶
func (c *CompactionConfig) Convert() *filestorage.CompactionConfig
Convert converts the CompactionConfig to the underlying config type.
Click to show internal directories.
Click to hide internal directories.