Documentation ¶
Index ¶
- func NewFactory(cfgType configmodels.Type, createDefaultConfig CreateDefaultConfig, ...) component.ProcessorFactory
- func NewLogsProcessor(config configmodels.Processor, nextConsumer consumer.LogsConsumer, ...) (component.LogsProcessor, error)
- func NewMetricsProcessor(config configmodels.Processor, nextConsumer consumer.MetricsConsumer, ...) (component.MetricsProcessor, error)
- func NewTraceProcessor(config configmodels.Processor, nextConsumer consumer.TraceConsumer, ...) (component.TraceProcessor, error)
- type CreateDefaultConfig
- type CreateLogsProcessor
- type CreateMetricsProcessor
- type CreateTraceProcessor
- type FactoryOption
- type LProcessor
- type MProcessor
- type Option
- type Shutdown
- type Start
- type TProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory( cfgType configmodels.Type, createDefaultConfig CreateDefaultConfig, options ...FactoryOption) component.ProcessorFactory
NewFactory returns a component.ProcessorFactory that only supports all types.
func NewLogsProcessor ¶ added in v0.7.0
func NewLogsProcessor( config configmodels.Processor, nextConsumer consumer.LogsConsumer, processor LProcessor, 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( config configmodels.Processor, nextConsumer consumer.MetricsConsumer, processor MProcessor, 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 NewTraceProcessor ¶ added in v0.7.0
func NewTraceProcessor( config configmodels.Processor, nextConsumer consumer.TraceConsumer, processor TProcessor, options ...Option, ) (component.TraceProcessor, error)
NewTraceProcessor creates a TraceProcessor that ensure context propagation and the right tags are set. TODO: Add observability metrics support
Types ¶
type CreateDefaultConfig ¶
type CreateDefaultConfig func() configmodels.Processor
CreateDefaultConfig is the equivalent of component.ProcessorFactory.CreateDefaultConfig()
type CreateLogsProcessor ¶ added in v0.7.0
type CreateLogsProcessor func(context.Context, component.ProcessorCreateParams, configmodels.Processor, consumer.LogsConsumer) (component.LogsProcessor, error)
CreateLogsProcessor is the equivalent of component.ProcessorFactory.CreateLogsProcessor()
type CreateMetricsProcessor ¶
type CreateMetricsProcessor func(context.Context, component.ProcessorCreateParams, configmodels.Processor, consumer.MetricsConsumer) (component.MetricsProcessor, error)
CreateMetricsProcessor is the equivalent of component.ProcessorFactory.CreateMetricsProcessor()
type CreateTraceProcessor ¶
type CreateTraceProcessor func(context.Context, component.ProcessorCreateParams, configmodels.Processor, consumer.TraceConsumer) (component.TraceProcessor, error)
CreateTraceProcessor is the equivalent of component.ProcessorFactory.CreateTraceProcessor()
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(createTraceProcessor CreateTraceProcessor) FactoryOption
WithTraces overrides the default "error not supported" implementation for CreateTraceProcessor.
type LProcessor ¶ added in v0.7.0
type LProcessor interface { // ProcessLogs 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. ProcessLogs(context.Context, data.Logs) (data.Logs, error) }
LProcessor is a helper interface that allows avoiding implementing all functions in LogsProcessor by using NewLogsProcessor.
type MProcessor ¶ added in v0.7.0
type MProcessor interface { // ProcessMetrics 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. ProcessMetrics(context.Context, pdata.Metrics) (pdata.Metrics, error) }
MProcessor is a helper interface that allows avoiding implementing all functions in MetricsProcessor by using NewTraceProcessor.
type Option ¶ added in v0.7.0
type Option func(*baseProcessor)
Option apply changes to internalOptions.
func WithCapabilities ¶ added in v0.7.0
func WithCapabilities(capabilities component.ProcessorCapabilities) Option
WithShutdown overrides the default GetCapabilities function for an processor. The default GetCapabilities function returns mutable capabilities.
func WithShutdown ¶ added in v0.7.0
WithShutdown overrides the default Shutdown function for an processor. The default shutdown function does nothing and always returns nil.
type Shutdown ¶ added in v0.7.0
Shutdown specifies the function invoked when the processor is being shutdown.
type Start ¶ added in v0.7.0
Start specifies the function invoked when the processor is being started.
type TProcessor ¶ added in v0.7.0
type TProcessor interface { // ProcessTraces 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. ProcessTraces(context.Context, pdata.Traces) (pdata.Traces, error) }
TProcessor is a helper interface that allows avoiding implementing all functions in TraceProcessor by using NewTraceProcessor.