processorhelper

package
v0.58.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 108

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSkipProcessingData = errors.New("sentinel error to skip processing data from the remainder of the pipeline")

ErrSkipProcessingData is a sentinel value to indicate when traces or metrics should intentionally be dropped from further processing in the pipeline because the data is determined to be irrelevant. A processor can return this error to stop further processing without propagating an error back up the pipeline to logs.

Functions

func NewLogsProcessor deprecated added in v0.7.0

func NewLogsProcessor(
	cfg config.Processor,
	nextConsumer consumer.Logs,
	logsFunc ProcessLogsFunc,
	options ...Option,
) (component.LogsProcessor, error)

Deprecated: [v0.58.0] use version with NewLogsProcessorWithCreateSettings.

func NewLogsProcessorWithCreateSettings added in v0.58.0

func NewLogsProcessorWithCreateSettings(
	_ context.Context,
	_ component.ProcessorCreateSettings,
	cfg config.Processor,
	nextConsumer consumer.Logs,
	logsFunc ProcessLogsFunc,
	options ...Option,
) (component.LogsProcessor, error)

NewLogsProcessorWithCreateSettings creates a LogsProcessor that ensure context propagation and the right tags are set.

func NewMetricsProcessor deprecated added in v0.7.0

func NewMetricsProcessor(
	cfg config.Processor,
	nextConsumer consumer.Metrics,
	metricsFunc ProcessMetricsFunc,
	options ...Option,
) (component.MetricsProcessor, error)

Deprecated: [v0.58.0] use version with NewMetricsProcessorWithCreateSettings.

func NewMetricsProcessorWithCreateSettings added in v0.58.0

func NewMetricsProcessorWithCreateSettings(
	_ context.Context,
	_ component.ProcessorCreateSettings,
	cfg config.Processor,
	nextConsumer consumer.Metrics,
	metricsFunc ProcessMetricsFunc,
	options ...Option,
) (component.MetricsProcessor, error)

NewMetricsProcessorWithCreateSettings creates a MetricsProcessor that ensure context propagation and the right tags are set.

func NewTracesProcessor deprecated added in v0.25.0

func NewTracesProcessor(
	cfg config.Processor,
	nextConsumer consumer.Traces,
	tracesFunc ProcessTracesFunc,
	options ...Option,
) (component.TracesProcessor, error)

Deprecated: [v0.58.0] use version with NewTracesProcessorWithCreateSettings.

func NewTracesProcessorWithCreateSettings added in v0.58.0

func NewTracesProcessorWithCreateSettings(
	_ context.Context,
	_ component.ProcessorCreateSettings,
	cfg config.Processor,
	nextConsumer consumer.Traces,
	tracesFunc ProcessTracesFunc,
	options ...Option,
) (component.TracesProcessor, error)

NewTracesProcessorWithCreateSettings creates a TracesProcessor that ensure context propagation and the right tags are set.

Types

type Option added in v0.7.0

type Option func(*baseSettings)

Option apply changes to internalOptions.

func WithCapabilities added in v0.7.0

func WithCapabilities(capabilities consumer.Capabilities) Option

WithCapabilities overrides the default GetCapabilities function for an processor. The default GetCapabilities function returns mutable capabilities.

func WithShutdown added in v0.7.0

func WithShutdown(shutdown component.ShutdownFunc) Option

WithShutdown overrides the default Shutdown function for an processor. The default shutdown function does nothing and always returns nil.

func WithStart added in v0.7.0

func WithStart(start component.StartFunc) Option

WithStart overrides the default Start function for an processor. The default shutdown function does nothing and always returns nil.

type ProcessLogsFunc added in v0.30.0

type ProcessLogsFunc func(context.Context, plog.Logs) (plog.Logs, error)

ProcessLogsFunc is a helper function that processes the incoming data and returns the data to be sent to the next component. If error is returned then returned data are ignored. It MUST not call the next component.

type ProcessMetricsFunc added in v0.30.0

type ProcessMetricsFunc func(context.Context, pmetric.Metrics) (pmetric.Metrics, error)

ProcessMetricsFunc is a helper function that processes the incoming data and returns the data to be sent to the next component. If error is returned then returned data are ignored. It MUST not call the next component.

type ProcessTracesFunc added in v0.30.0

type ProcessTracesFunc func(context.Context, ptrace.Traces) (ptrace.Traces, error)

ProcessTracesFunc is a helper function that processes the incoming data and returns the data to be sent to the next component. If error is returned then returned data are ignored. It MUST not call the next component.

Jump to

Keyboard shortcuts

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