Documentation ¶
Index ¶
- Variables
- func NewFactory(cfgType config.Type, createDefaultConfig CreateDefaultConfig, ...) component.ProcessorFactory
- func NewLogsProcessor(cfg config.Processor, nextConsumer consumer.Logs, logsFunc ProcessLogsFunc, ...) (component.LogsProcessor, error)
- func NewMetricsProcessor(cfg config.Processor, nextConsumer consumer.Metrics, ...) (component.MetricsProcessor, error)
- func NewTracesProcessor(cfg config.Processor, nextConsumer consumer.Traces, ...) (component.TracesProcessor, error)
- type CreateDefaultConfig
- type CreateLogsProcessor
- type CreateMetricsProcessor
- type CreateTracesProcessor
- type FactoryOption
- 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 NewFactory ¶
func NewFactory( cfgType config.Type, createDefaultConfig CreateDefaultConfig, options ...FactoryOption) component.ProcessorFactory
NewFactory returns a component.ProcessorFactory.
func NewLogsProcessor ¶ added in v0.7.0
func NewLogsProcessor( cfg config.Processor, nextConsumer consumer.Logs, logsFunc ProcessLogsFunc, options ...Option, ) (component.LogsProcessor, error)
NewLogsProcessor creates a LogsProcessor that ensure context propagation and the right tags are set. TODO: Add observability metrics support
func NewMetricsProcessor ¶ added in v0.7.0
func NewMetricsProcessor( cfg config.Processor, nextConsumer consumer.Metrics, metricsFunc ProcessMetricsFunc, options ...Option, ) (component.MetricsProcessor, error)
NewMetricsProcessor creates a MetricsProcessor that ensure context propagation and the right tags are set. TODO: Add observability metrics support
func NewTracesProcessor ¶ added in v0.25.0
func NewTracesProcessor( cfg config.Processor, nextConsumer consumer.Traces, tracesFunc ProcessTracesFunc, options ...Option, ) (component.TracesProcessor, error)
NewTracesProcessor creates a TracesProcessor that ensure context propagation and the right tags are set. TODO: Add observability metrics support
Types ¶
type CreateDefaultConfig ¶
CreateDefaultConfig is the equivalent of component.ProcessorFactory.CreateDefaultConfig()
type CreateLogsProcessor ¶ added in v0.7.0
type CreateLogsProcessor func(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Logs) (component.LogsProcessor, error)
CreateLogsProcessor is the equivalent of component.ProcessorFactory.CreateLogsProcessor()
type CreateMetricsProcessor ¶
type CreateMetricsProcessor func(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Metrics) (component.MetricsProcessor, error)
CreateMetricsProcessor is the equivalent of component.ProcessorFactory.CreateMetricsProcessor()
type CreateTracesProcessor ¶ added in v0.25.0
type CreateTracesProcessor func(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Traces) (component.TracesProcessor, error)
CreateTracesProcessor is the equivalent of component.ProcessorFactory.CreateTracesProcessor()
type FactoryOption ¶
type FactoryOption func(o *factory)
FactoryOption apply changes to ProcessorOptions.
func WithLogs ¶
func WithLogs(createLogsProcessor CreateLogsProcessor) FactoryOption
WithLogs overrides the default "error not supported" implementation for CreateLogsProcessor.
func WithMetrics ¶
func WithMetrics(createMetricsProcessor CreateMetricsProcessor) FactoryOption
WithMetrics overrides the default "error not supported" implementation for CreateMetricsProcessor.
func WithTraces ¶
func WithTraces(createTracesProcessor CreateTracesProcessor) FactoryOption
WithTraces overrides the default "error not supported" implementation for CreateTracesProcessor.
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 componenthelper.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 componenthelper.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
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
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
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.