Documentation
¶
Index ¶
- type CreateLogsFunc
- type CreateMetricsFunc
- type CreateProfilesFunc
- type CreateTracesFunc
- type Factory
- type FactoryOption
- func WithLogs(createLogs CreateLogsFunc, sl component.StabilityLevel) FactoryOption
- func WithMetrics(createMetrics CreateMetricsFunc, sl component.StabilityLevel) FactoryOption
- func WithProfiles(createProfiles CreateProfilesFunc, sl component.StabilityLevel) FactoryOption
- func WithTraces(createTraces CreateTracesFunc, sl component.StabilityLevel) FactoryOption
- type Logs
- type Metrics
- type Profiles
- type Request
- type RequestErrorHandler
- type Settings
- type Traces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateLogsFunc ¶
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 ¶
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
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 ¶
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 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
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.