Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeFactoryMap
deprecated
MakeFactoryMap takes a list of factories and returns a map with Factory type as keys. It returns a non-nil error when there are factories with duplicate type.
Deprecated: [v0.120.0] Use otelcol.MakeFactoryMap[processor.Factory] instead
Types ¶
type CreateLogsFunc ¶
CreateLogsFunc is the equivalent of Factory.CreateLogs.
type CreateMetricsFunc ¶
type CreateMetricsFunc func(context.Context, Settings, component.Config, consumer.Metrics) (Metrics, error)
CreateMetricsFunc is the equivalent of Factory.CreateMetrics().
func (CreateMetricsFunc) CreateMetrics ¶ added in v0.111.0
func (f CreateMetricsFunc) CreateMetrics(ctx context.Context, set Settings, cfg component.Config, next consumer.Metrics) (Metrics, error)
CreateMetrics implements Factory.CreateMetrics. Deprecated: [v0.120.0] No longer used, will be removed.
type CreateTracesFunc ¶
type CreateTracesFunc func(context.Context, Settings, component.Config, consumer.Traces) (Traces, error)
CreateTracesFunc is the equivalent of Factory.CreateTraces().
type Factory ¶
type Factory interface { component.Factory // CreateTraces creates a Traces processor based on this config. // If the processor type does not support traces, // this function returns the error [pipeline.ErrSignalNotSupported]. // Implementers can assume `next` is never nil. CreateTraces(ctx context.Context, set Settings, cfg component.Config, next consumer.Traces) (Traces, error) // TracesStability gets the stability level of the Traces processor. TracesStability() component.StabilityLevel // CreateMetrics creates a Metrics processor based on this config. // If the processor type does not support metrics, // this function returns the error [pipeline.ErrSignalNotSupported]. // Implementers can assume `next` is never nil. CreateMetrics(ctx context.Context, set Settings, cfg component.Config, next consumer.Metrics) (Metrics, error) // MetricsStability gets the stability level of the Metrics processor. MetricsStability() component.StabilityLevel // CreateLogs creates a Logs processor based on the config. // If the processor type does not support logs, // this function returns the error [pipeline.ErrSignalNotSupported]. // Implementers can assume `next` is never nil. CreateLogs(ctx context.Context, set Settings, cfg component.Config, next consumer.Logs) (Logs, error) // LogsStability gets the stability level of the Logs processor. LogsStability() component.StabilityLevel // contains filtered or unexported methods }
Factory is Factory interface for processors.
This interface cannot be directly implemented. Implementations must use the NewFactory to implement it.
func NewFactory ¶
func NewFactory(cfgType component.Type, createDefaultConfig component.CreateDefaultConfigFunc, options ...FactoryOption) Factory
NewFactory returns a Factory.
type FactoryOption ¶
type FactoryOption interface {
// contains filtered or unexported methods
}
FactoryOption apply changes to Options.
func WithLogs ¶
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 ¶
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 ¶
func WithTraces(createTraces CreateTracesFunc, sl component.StabilityLevel) FactoryOption
WithTraces overrides the default "error not supported" implementation for CreateTraces and the default "undefined" stability level.
type Settings ¶ added in v0.103.0
type Settings 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 }
Settings is passed to Create* functions in Factory.
Directories
¶
Path | Synopsis |
---|---|
batchprocessor
module
|
|
memorylimiterprocessor
module
|
|
processorhelperprofiles
Module
|
|
xprocessorhelper
Module
|
|
processorprofiles
module
|
|
processortest
module
|
|
xprocessor
module
|