Documentation
¶
Overview ¶
Package memorylimiter provides a processor for OpenTelemetry Service pipeline that drops data on the pipeline according to the current state of memory usage.
Index ¶
- type Config
- type DualTypeProcessor
- type Factory
- func (f *Factory) CreateDefaultConfig() configmodels.Processor
- func (f *Factory) CreateMetricsProcessor(_ context.Context, params component.ProcessorCreateParams, ...) (component.MetricsProcessor, error)
- func (f *Factory) CreateTraceProcessor(_ context.Context, params component.ProcessorCreateParams, ...) (component.TraceProcessor, error)
- func (f *Factory) Type() configmodels.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { configmodels.ProcessorSettings `mapstructure:",squash"` // CheckInterval is the time between measurements of memory usage for the // purposes of avoiding going over the limits. Defaults to zero, so no // checks will be performed. CheckInterval time.Duration `mapstructure:"check_interval"` // MemoryLimitMiB is the maximum amount of memory, in MiB, targeted to be // allocated by the process. MemoryLimitMiB uint32 `mapstructure:"limit_mib"` // MemorySpikeLimitMiB is the maximum, in MiB, spike expected between the // measurements of memory usage. MemorySpikeLimitMiB uint32 `mapstructure:"spike_limit_mib"` // BallastSizeMiB is the size, in MiB, of the ballast size being used by the // process. BallastSizeMiB uint32 `mapstructure:"ballast_size_mib"` }
Config defines configuration for memory memoryLimiter processor.
type DualTypeProcessor ¶
type DualTypeProcessor interface { consumer.TraceConsumer consumer.MetricsConsumer component.Processor }
type Factory ¶
type Factory struct { }
Factory is the factory for Attribute Key processor.
func (*Factory) CreateDefaultConfig ¶
func (f *Factory) CreateDefaultConfig() configmodels.Processor
CreateDefaultConfig creates the default configuration for processor. Notice that the default configuration is expected to fail for this processor.
func (*Factory) CreateMetricsProcessor ¶
func (f *Factory) CreateMetricsProcessor( _ context.Context, params component.ProcessorCreateParams, nextConsumer consumer.MetricsConsumer, cfg configmodels.Processor, ) (component.MetricsProcessor, error)
CreateMetricsProcessor creates a metrics processor based on this config.
func (*Factory) CreateTraceProcessor ¶
func (f *Factory) CreateTraceProcessor( _ context.Context, params component.ProcessorCreateParams, nextConsumer consumer.TraceConsumer, cfg configmodels.Processor, ) (component.TraceProcessor, error)
CreateTraceProcessor creates a trace processor based on this config.
func (*Factory) Type ¶
func (f *Factory) Type() configmodels.Type
Type gets the type of the config created by this factory.
Click to show internal directories.
Click to hide internal directories.