Documentation ¶
Index ¶
- func MakeFactoryMap(factories ...Factory) (map[component.Type]Factory, error)
- type Builder
- func (b *Builder) CreateLogs(ctx context.Context, set CreateSettings, next consumer.Logs) (Logs, error)
- func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings, next consumer.Metrics) (Metrics, error)
- func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings, next consumer.Traces) (Traces, error)
- func (b *Builder) Factory(componentType component.Type) component.Factory
- type CreateLogsFunc
- type CreateMetricsFunc
- type CreateSettings
- type CreateTracesFunc
- type Factory
- type FactoryOption
- type Logs
- type Metrics
- type Traces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶ added in v0.68.0
type Builder struct {
// contains filtered or unexported fields
}
Builder processor is a helper struct that given a set of Configs and Factories helps with creating processors.
func NewBuilder ¶ added in v0.68.0
func NewBuilder(cfgs map[component.ID]component.Config, factories map[component.Type]Factory) *Builder
NewBuilder creates a new processor.Builder to help with creating components form a set of configs and factories.
func (*Builder) CreateLogs ¶ added in v0.68.0
func (b *Builder) CreateLogs(ctx context.Context, set CreateSettings, next consumer.Logs) (Logs, error)
CreateLogs creates a Logs processor based on the settings and config.
func (*Builder) CreateMetrics ¶ added in v0.68.0
func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings, next consumer.Metrics) (Metrics, error)
CreateMetrics creates a Metrics processor based on the settings and config.
func (*Builder) CreateTraces ¶ added in v0.68.0
func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings, next consumer.Traces) (Traces, error)
CreateTraces creates a Traces processor based on the settings and config.
type CreateLogsFunc ¶ added in v0.68.0
type CreateLogsFunc func(context.Context, CreateSettings, component.Config, consumer.Logs) (Logs, error)
CreateLogsFunc is the equivalent of Factory.CreateLogs().
func (CreateLogsFunc) CreateLogsProcessor ¶ added in v0.69.0
func (f CreateLogsFunc) CreateLogsProcessor( ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Logs, ) (Logs, error)
CreateLogsProcessor implements Factory.CreateLogsProcessor().
type CreateMetricsFunc ¶ added in v0.68.0
type CreateMetricsFunc func(context.Context, CreateSettings, component.Config, consumer.Metrics) (Metrics, error)
CreateMetricsFunc is the equivalent of Factory.CreateMetrics().
func (CreateMetricsFunc) CreateMetricsProcessor ¶ added in v0.69.0
func (f CreateMetricsFunc) CreateMetricsProcessor( ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Metrics, ) (Metrics, error)
CreateMetricsProcessor implements Factory.CreateMetricsProcessor().
type CreateSettings ¶ added in v0.68.0
type CreateSettings struct { // ID returns the ID of the component that will be created. ID component.ID component.TelemetrySettings // BuildInfo can be used by components for informational purposes BuildInfo component.BuildInfo }
CreateSettings is passed to Create* functions in Factory.
type CreateTracesFunc ¶ added in v0.68.0
type CreateTracesFunc func(context.Context, CreateSettings, component.Config, consumer.Traces) (Traces, error)
CreateTracesFunc is the equivalent of Factory.CreateTraces().
func (CreateTracesFunc) CreateTracesProcessor ¶ added in v0.69.0
func (f CreateTracesFunc) CreateTracesProcessor( ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Traces) (Traces, error)
CreateTracesProcessor implements Factory.CreateTracesProcessor().
type Factory ¶ added in v0.68.0
type Factory interface { component.Factory // CreateTracesProcessor creates a TracesProcessor based on this config. // If the processor type does not support tracing or if the config is not valid, // an error will be returned instead. CreateTracesProcessor(ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Traces) (Traces, error) // TracesProcessorStability gets the stability level of the TracesProcessor. TracesProcessorStability() component.StabilityLevel // CreateMetricsProcessor creates a MetricsProcessor based on this config. // If the processor type does not support metrics or if the config is not valid, // an error will be returned instead. CreateMetricsProcessor(ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Metrics) (Metrics, error) // MetricsProcessorStability gets the stability level of the MetricsProcessor. MetricsProcessorStability() component.StabilityLevel // CreateLogsProcessor creates a LogsProcessor based on the config. // If the processor type does not support logs or if the config is not valid, // an error will be returned instead. CreateLogsProcessor(ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Logs) (Logs, error) // LogsProcessorStability gets the stability level of the LogsProcessor. LogsProcessorStability() component.StabilityLevel // contains filtered or unexported methods }
Factory is Factory interface for processors.
This interface cannot be directly implemented. Implementations must use the NewProcessorFactory to implement it.
func NewFactory ¶ added in v0.68.0
func NewFactory(cfgType component.Type, createDefaultConfig component.CreateDefaultConfigFunc, options ...FactoryOption) Factory
NewFactory returns a Factory.
type FactoryOption ¶ added in v0.68.0
type FactoryOption interface {
// contains filtered or unexported methods
}
FactoryOption apply changes to Options.
func WithLogs ¶ added in v0.68.0
func WithLogs(createLogs CreateLogsFunc, sl component.StabilityLevel) FactoryOption
WithLogs overrides the default "error not supported" implementation for CreateLogs and the default "undefined" stability level.
func WithMetrics ¶ added in v0.68.0
func WithMetrics(createMetrics CreateMetricsFunc, sl component.StabilityLevel) FactoryOption
WithMetrics overrides the default "error not supported" implementation for CreateMetrics and the default "undefined" stability level.
func WithTraces ¶ added in v0.68.0
func WithTraces(createTraces CreateTracesFunc, sl component.StabilityLevel) FactoryOption
WithTraces overrides the default "error not supported" implementation for CreateTraces and the default "undefined" stability level.
Directories ¶
Path | Synopsis |
---|---|
batchprocessor
module
|
|
memorylimiterprocessor
module
|
|
processorhelperprofiles
Module
|
|
xprocessorhelper
Module
|
|
processorprofiles
module
|
|
xprocessor
module
|