Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateLoggerFunc ¶
CreateLoggerFunc is the equivalent of Factory.CreateLogger.
type CreateMeterProviderFunc ¶ added in v0.105.0
type CreateMeterProviderFunc func(context.Context, Settings, component.Config) (metric.MeterProvider, error)
CreateMeterProviderFunc is the equivalent of Factory.CreateMeterProvider.
type CreateTracerProviderFunc ¶
type CreateTracerProviderFunc func(context.Context, Settings, component.Config) (trace.TracerProvider, error)
CreateTracerProviderFunc is the equivalent of Factory.CreateTracerProvider.
type Factory ¶
type Factory interface { // CreateDefaultConfig creates the default configuration for the telemetry. // TODO: Should we just inherit from component.Factory? CreateDefaultConfig() component.Config // CreateLogger creates a logger. CreateLogger(ctx context.Context, set Settings, cfg component.Config) (*zap.Logger, error) // CreateTracerProvider creates a TracerProvider. CreateTracerProvider(ctx context.Context, set Settings, cfg component.Config) (trace.TracerProvider, error) // CreateMeterProvider creates a MeterProvider. CreateMeterProvider(ctx context.Context, set Settings, cfg component.Config) (metric.MeterProvider, error) // contains filtered or unexported methods }
Factory is factory interface for telemetry. This interface cannot be directly implemented. Implementations must use the NewFactory to implement it.
func NewFactory ¶
func NewFactory(createDefaultConfig component.CreateDefaultConfigFunc, options ...FactoryOption) Factory
NewFactory returns a new Factory.
type FactoryOption ¶
type FactoryOption interface {
// contains filtered or unexported methods
}
FactoryOption apply changes to Factory.
func WithLogger ¶
func WithLogger(createLogger CreateLoggerFunc) FactoryOption
WithLogger overrides the default no-op logger.
func WithMeterProvider ¶ added in v0.105.0
func WithMeterProvider(createMeterProvider CreateMeterProviderFunc) FactoryOption
WithMeterProvider overrides the default no-op meter provider.
func WithTracerProvider ¶
func WithTracerProvider(createTracerProvider CreateTracerProviderFunc) FactoryOption
WithTracerProvider overrides the default no-op tracer provider.
Click to show internal directories.
Click to hide internal directories.