Documentation
¶
Index ¶
- Variables
- func NewLogsProcessor(_ context.Context, set processor.CreateSettings, _ component.Config, ...) (processor.Logs, error)
- func NewMetricsProcessor(_ context.Context, set processor.CreateSettings, _ component.Config, ...) (processor.Metrics, error)
- func NewTracesProcessor(_ context.Context, set processor.CreateSettings, _ component.Config, ...) (processor.Traces, error)
- type Option
- type ProcessLogsFunc
- type ProcessMetricsFunc
- type ProcessTracesFunc
Constants ¶
This section is empty.
Variables ¶
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 ¶
func NewLogsProcessor( _ context.Context, set processor.CreateSettings, _ component.Config, nextConsumer consumer.Logs, logsFunc ProcessLogsFunc, options ...Option, ) (processor.Logs, error)
NewLogsProcessor creates a processor.Logs that ensure context propagation and the right tags are set.
func NewMetricsProcessor ¶
func NewMetricsProcessor( _ context.Context, set processor.CreateSettings, _ component.Config, nextConsumer consumer.Metrics, metricsFunc ProcessMetricsFunc, options ...Option, ) (processor.Metrics, error)
NewMetricsProcessor creates a processor.Metrics that ensure context propagation and the right tags are set.
func NewTracesProcessor ¶
func NewTracesProcessor( _ context.Context, set processor.CreateSettings, _ component.Config, nextConsumer consumer.Traces, tracesFunc ProcessTracesFunc, options ...Option, ) (processor.Traces, error)
NewTracesProcessor creates a processor.Traces that ensure context propagation and the right tags are set.
Types ¶
type Option ¶
type Option func(*baseSettings)
Option apply changes to internalOptions.
func WithCapabilities ¶
func WithCapabilities(capabilities consumer.Capabilities) Option
WithCapabilities overrides the default GetCapabilities function for an processor. The default GetCapabilities function returns mutable capabilities.
func WithShutdown ¶
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.
type ProcessLogsFunc ¶
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 ¶
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 ¶
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.