resourceprocessor

package
v0.0.0-...-5deca64 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *flag.FlagSet)

AddFlags adds flags for Options.

Types

type Factory

type Factory struct {
	Wrapped component.ProcessorFactory
	Viper   *viper.Viper
}

Factory wraps resourceprocessor.Factory and makes the default config configurable via viper. For instance this enables using flags as default values in the config object.

func (Factory) CreateDefaultConfig

func (f Factory) CreateDefaultConfig() configmodels.Processor

CreateDefaultConfig returns default configuration of Factory. This function implements OTEL component.ProcessorFactoryBase interface.

func (Factory) CreateLogsProcessor

func (f Factory) CreateLogsProcessor(
	ctx context.Context,
	params component.ProcessorCreateParams,
	cfg configmodels.Processor,
	nextConsumer consumer.LogsConsumer,
) (component.LogsProcessor, error)

CreateLogsProcessor creates a processor based on the config. If the processor type does not support logs or if the config is not valid error will be returned instead.

func (Factory) CreateMetricsProcessor

CreateMetricsProcessor creates a resource processor. This function implements component.ProcessorFactoryOld.

func (Factory) CreateTracesProcessor

func (f Factory) CreateTracesProcessor(
	ctx context.Context,
	params component.ProcessorCreateParams,
	cfg configmodels.Processor,
	nextConsumer consumer.TracesConsumer,
) (component.TracesProcessor, error)

CreateTracesProcessor creates resource processor. This function implements OTEL component.ProcessorFactoryOld interface.

func (Factory) GetTags

func (f Factory) GetTags() map[string]string

GetTags returns tags to be added to all spans.

func (Factory) Type

func (f Factory) Type() configmodels.Type

Type returns the type of the receiver.

Jump to

Keyboard shortcuts

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