internal

package
v0.106.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 3 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) (Logs, error)

CreateLogsFunc is the equivalent of Factory.CreateLogs.

func (CreateLogsFunc) CreateLogsExporter

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

CreateLogsExporter implements Factory.CreateLogsExporter().

type CreateMetricsFunc

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

CreateMetricsFunc is the equivalent of Factory.CreateMetrics.

func (CreateMetricsFunc) CreateMetricsExporter

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

CreateMetricsExporter implements ExporterFactory.CreateMetricsExporter().

type CreateTracesFunc

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

CreateTracesFunc is the equivalent of Factory.CreateTraces.

func (CreateTracesFunc) CreateTracesExporter

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

CreateTracesExporter implements ExporterFactory.CreateTracesExporter().

type Factory

type Factory interface {
	component.Factory

	// CreateTracesExporter creates a TracesExporter based on this config.
	// If the exporter type does not support tracing,
	// this function returns the error [component.ErrDataTypeIsNotSupported].
	CreateTracesExporter(ctx context.Context, set Settings, cfg component.Config) (Traces, error)

	// TracesExporterStability gets the stability level of the TracesExporter.
	TracesExporterStability() component.StabilityLevel

	// CreateMetricsExporter creates a MetricsExporter based on this config.
	// If the exporter type does not support metrics,
	// this function returns the error [component.ErrDataTypeIsNotSupported].
	CreateMetricsExporter(ctx context.Context, set Settings, cfg component.Config) (Metrics, error)

	// MetricsExporterStability gets the stability level of the MetricsExporter.
	MetricsExporterStability() component.StabilityLevel

	// CreateLogsExporter creates a LogsExporter based on the config.
	// If the exporter type does not support logs,
	// this function returns the error [component.ErrDataTypeIsNotSupported].
	CreateLogsExporter(ctx context.Context, set Settings, cfg component.Config) (Logs, error)

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

Factory is a factory interface for exporters. 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 Factory.

func WithLogs

func WithLogs(createLogs CreateLogsFunc, sl component.StabilityLevel) FactoryOption

WithLogs overrides the default "error not supported" implementation for CreateLogsExporter 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 CreateMetricsExporter 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 CreateTracesExporter and the default "undefined" stability level.

type Logs

type Logs interface {
	component.Component
	consumer.Logs
}

Logs is an exporter that can consume logs.

type Metrics

type Metrics interface {
	component.Component
	consumer.Metrics
}

Metrics is an exporter that can consume metrics.

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
}

type Traces

type Traces interface {
	component.Component
	consumer.Traces
}

Traces is an exporter that can consume traces.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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