internal

package
v0.108.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateLogsFunc

type CreateLogsFunc func(context.Context, Settings, component.Config, consumer.Logs) (Logs, error)

CreateLogsFunc is the equivalent of Factory.CreateLogs().

func (CreateLogsFunc) CreateLogsProcessor

func (f CreateLogsFunc) CreateLogsProcessor(
	ctx context.Context,
	set Settings,
	cfg component.Config,
	nextConsumer consumer.Logs,
) (Logs, error)

CreateLogsProcessor implements Factory.CreateLogsProcessor().

type CreateMetricsFunc

type CreateMetricsFunc func(context.Context, Settings, component.Config, consumer.Metrics) (Metrics, error)

CreateMetricsFunc is the equivalent of Factory.CreateMetrics().

func (CreateMetricsFunc) CreateMetricsProcessor

func (f CreateMetricsFunc) CreateMetricsProcessor(
	ctx context.Context,
	set Settings,
	cfg component.Config,
	nextConsumer consumer.Metrics,
) (Metrics, error)

CreateMetricsProcessor implements Factory.CreateMetricsProcessor().

type CreateProfilesFunc added in v0.107.0

CreateProfilesFunc is the equivalent of Factory.CreateProfiles().

func (CreateProfilesFunc) CreateProfilesProcessor added in v0.107.0

func (f CreateProfilesFunc) CreateProfilesProcessor(
	ctx context.Context,
	set Settings,
	cfg component.Config,
	nextConsumer consumerprofiles.Profiles) (Profiles, error)

CreateProfilesProcessor implements Factory.CreateProfilesProcessor().

type CreateTracesFunc

type CreateTracesFunc func(context.Context, Settings, component.Config, consumer.Traces) (Traces, error)

CreateTracesFunc is the equivalent of Factory.CreateTraces().

func (CreateTracesFunc) CreateTracesProcessor

func (f CreateTracesFunc) CreateTracesProcessor(
	ctx context.Context,
	set Settings,
	cfg component.Config,
	nextConsumer consumer.Traces) (Traces, error)

CreateTracesProcessor implements Factory.CreateTracesProcessor().

type Factory

type Factory interface {
	component.Factory

	// CreateTracesProcessor creates a TracesProcessor based on this config.
	// If the processor type does not support traces,
	// this function returns the error [component.ErrDataTypeIsNotSupported].
	// Implementers can assume `nextConsumer` is never nil.
	CreateTracesProcessor(ctx context.Context, set Settings, 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,
	// this function returns the error [component.ErrDataTypeIsNotSupported].
	// Implementers can assume `nextConsumer` is never nil.
	CreateMetricsProcessor(ctx context.Context, set Settings, 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,
	// this function returns the error [component.ErrDataTypeIsNotSupported].
	// Implementers can assume `nextConsumer` is never nil.
	CreateLogsProcessor(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Logs) (Logs, error)

	// LogsProcessorStability gets the stability level of the LogsProcessor.
	LogsProcessorStability() component.StabilityLevel

	// CreateProfilesProcessor creates a ProfilesProcessor 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.
	CreateProfilesProcessor(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumerprofiles.Profiles) (Profiles, error)

	// ProfilesProcessorStability gets the stability level of the ProfilesProcessor.
	ProfilesProcessorStability() component.StabilityLevel
	// contains filtered or unexported methods
}

Factory is a Factory interface for processors.

This interface cannot be directly implemented. Implementations must use the NewProcessorFactory 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 WithProfiles added in v0.107.0

func WithProfiles(createProfiles CreateProfilesFunc, sl component.StabilityLevel) FactoryOption

WithProfiles overrides the default "error not supported" implementation for CreateProfiles 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 Logs

type Logs interface {
	component.Component
	consumer.Logs
}

Logs is a processor that can consume logs.

type Metrics

type Metrics interface {
	component.Component
	consumer.Metrics
}

Metrics is a processor that can consume metrics.

type Profiles added in v0.107.0

type Profiles interface {
	component.Component
	consumerprofiles.Profiles
}

Profiles is a processor that can consume profiles.

type Settings

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.

type Traces

type Traces interface {
	component.Component
	consumer.Traces
}

Traces is a processor that can consume traces.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL