internal

package
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 5 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 CreateProfilesFunc added in v0.107.0

type CreateProfilesFunc func(context.Context, Settings, component.Config) (Profiles, error)

CreateProfilesFunc is the equivalent of Factory.CreateProfiles.

func (CreateProfilesFunc) CreateProfilesExporter added in v0.107.0

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

CreateProfilesExporter implements ExporterFactory.CreateProfilesExporter().

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 [pipeline.ErrSignalNotSupported].
	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 [pipeline.ErrSignalNotSupported].
	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 [pipeline.ErrSignalNotSupported].
	CreateLogsExporter(ctx context.Context, set Settings, cfg component.Config) (Logs, error)

	// LogsExporterStability gets the stability level of the LogsExporter.
	LogsExporterStability() component.StabilityLevel

	// CreateProfilesExporter creates a ProfilesExporter based on this config.
	// If the exporter type does not support tracing,
	// this function returns the error [pipeline.ErrSignalNotSupported].
	CreateProfilesExporter(ctx context.Context, set Settings, cfg component.Config) (Profiles, error)

	// ProfilesExporterStability gets the stability level of the ProfilesExporter.
	ProfilesExporterStability() 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 WithProfiles added in v0.107.0

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

WithProfiles overrides the default "error not supported" implementation for CreateProfilesExporter 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 Profiles added in v0.107.0

type Profiles interface {
	component.Component
	consumerprofiles.Profiles
}

Profiles is an exporter that can consume profiles.

type Request added in v0.109.0

type Request interface {
	// Export exports the request to an external endpoint.
	Export(ctx context.Context) error
	// ItemsCount returns a number of basic items in the request where item is the smallest piece of data that can be
	// sent. For example, for OTLP exporter, this value represents the number of spans,
	// metric data points or log records.
	ItemsCount() int
}

Request represents a single request that can be sent to an external endpoint. Experimental: This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.

func ExtractPartialRequest added in v0.109.0

func ExtractPartialRequest(req Request, err error) Request

extractPartialRequest returns a new Request that may contain the items left to be sent if only some items failed to process and can be retried. Otherwise, it returns the original Request.

type RequestErrorHandler added in v0.109.0

type RequestErrorHandler interface {
	Request
	// OnError returns a new Request may contain the items left to be sent if some items failed to process and can be retried.
	// Otherwise, it should return the original Request.
	OnError(error) Request
}

RequestErrorHandler is an optional interface that can be implemented by Request to provide a way handle partial temporary failures. For example, if some items failed to process and can be retried, this interface allows to return a new Request that contains the items left to be sent. Otherwise, the original Request should be returned. If not implemented, the original Request will be returned assuming the error is applied to the whole Request. Experimental: This API is at the early stage of development and may change without backward compatibility until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.

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