Documentation ¶
Index ¶
- func MakeFactoryMap(factories ...Factory) (map[component.Type]Factory, error)
- type Builder
- func (b *Builder) CreateLogs(ctx context.Context, set CreateSettings) (Logs, error)
- func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings) (Metrics, error)
- func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings) (Traces, error)
- func (b *Builder) Factory(componentType component.Type) component.Factory
- type CreateLogsFunc
- type CreateMetricsFunc
- type CreateSettings
- type CreateTracesFunc
- type Factory
- type FactoryOption
- type Logs
- type Metrics
- type Traces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder exporter is a helper struct that given a set of Configs and Factories helps with creating exporters.
func NewBuilder ¶
func NewBuilder(cfgs map[component.ID]component.Config, factories map[component.Type]Factory) *Builder
NewBuilder creates a new exporter.Builder to help with creating components form a set of configs and factories.
func (*Builder) CreateLogs ¶
CreateLogs creates a Logs exporter based on the settings and config.
func (*Builder) CreateMetrics ¶
CreateMetrics creates a Metrics exporter based on the settings and config.
func (*Builder) CreateTraces ¶
CreateTraces creates a Traces exporter based on the settings and config.
type CreateLogsFunc ¶
CreateLogsFunc is the equivalent of Factory.CreateLogs.
func (CreateLogsFunc) CreateLogsExporter ¶
func (f CreateLogsFunc) CreateLogsExporter(ctx context.Context, set CreateSettings, 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 CreateSettings, cfg component.Config) (Metrics, error)
CreateMetricsExporter implements ExporterFactory.CreateMetricsExporter().
type CreateSettings ¶
type CreateSettings 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 }
CreateSettings configures exporter creators.
type CreateTracesFunc ¶
CreateTracesFunc is the equivalent of Factory.CreateTraces.
func (CreateTracesFunc) CreateTracesExporter ¶
func (f CreateTracesFunc) CreateTracesExporter(ctx context.Context, set CreateSettings, 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 or if the config is not valid, // an error will be returned instead. CreateTracesExporter(ctx context.Context, set CreateSettings, 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 or if the config is not valid, // an error will be returned instead. CreateMetricsExporter(ctx context.Context, set CreateSettings, 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 or if the config is not valid, // an error will be returned instead. CreateLogsExporter(ctx context.Context, set CreateSettings, cfg component.Config) (Logs, error) // LogsExporterStability gets the stability level of the LogsExporter. LogsExporterStability() component.StabilityLevel // contains filtered or unexported methods }
Factory is 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.
Directories ¶
Path | Synopsis |
---|---|
debugexporter
module
|
|
Package exporterhelper provides helper functions for exporters.
|
Package exporterhelper provides helper functions for exporters. |
internal
|
|
loggingexporter
module
|
|
nopexporter
module
|
|
otlpexporter
module
|
|
otlphttpexporter
module
|