Documentation ¶
Index ¶
- func NewTraceProcessor(nextConsumer consumer.TraceConsumer, replacements ...KeyReplacement) (processor.TraceProcessor, error)
- type Config
- type Factory
- func (f *Factory) CreateDefaultConfig() configmodels.Processor
- func (f *Factory) CreateMetricsProcessor(logger *zap.Logger, nextConsumer consumer.MetricsConsumer, ...) (processor.MetricsProcessor, error)
- func (f *Factory) CreateTraceProcessor(logger *zap.Logger, nextConsumer consumer.TraceConsumer, ...) (processor.TraceProcessor, error)
- func (f *Factory) Type() string
- type KeyReplacement
- type NewKeyProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTraceProcessor ¶
func NewTraceProcessor(nextConsumer consumer.TraceConsumer, replacements ...KeyReplacement) (processor.TraceProcessor, error)
NewTraceProcessor returns a processor.TraceProcessor
Types ¶
type Config ¶
type Config struct { configmodels.ProcessorSettings `mapstructure:",squash"` // map key is the attribute key to be replaced. Keys map[string]NewKeyProperties `mapstructure:"keys"` }
Config defines configuration for Attribute Key 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.
func (*Factory) CreateMetricsProcessor ¶
func (f *Factory) CreateMetricsProcessor( logger *zap.Logger, nextConsumer consumer.MetricsConsumer, cfg configmodels.Processor, ) (processor.MetricsProcessor, error)
CreateMetricsProcessor creates a metrics processor based on this config.
func (*Factory) CreateTraceProcessor ¶
func (f *Factory) CreateTraceProcessor( logger *zap.Logger, nextConsumer consumer.TraceConsumer, cfg configmodels.Processor, ) (processor.TraceProcessor, error)
CreateTraceProcessor creates a trace processor based on this config.
type KeyReplacement ¶
type KeyReplacement struct { // Key the attribute key to be replaced. Key string `mapstructure:"key"` // NewKey is the value that will be used as the new key for the attribute. NewKey string `mapstructure:"replacement"` // Overwrite is set to true to indicate that the replacement should be // performed even if the new key already exists on the attributes. // In this case the original value associated with the new key is lost. Overwrite bool `mapstructure:"overwrite"` // KeepOriginal is set to true to indicate that the original key // should not be removed from the attributes. KeepOriginal bool `mapstructure:"keep"` }
KeyReplacement identifies a key and its respective replacement.
type NewKeyProperties ¶
type NewKeyProperties struct { // NewKey is the value that will be used as the new key for the attribute. NewKey string `mapstructure:"replacement"` // Overwrite is set to true to indicate that the replacement should be // performed even if the new key already exists on the attributes. // In this case the original value associated with the new key is lost. Overwrite bool `mapstructure:"overwrite"` // KeepOriginal is set to true to indicate that the original key // should not be removed from the attributes. KeepOriginal bool `mapstructure:"keep"` }
NewKeyProperties defines the key's replacments properties.
Click to show internal directories.
Click to hide internal directories.