Documentation ¶
Index ¶
- func NewFactory(cfgType configmodels.Type, createDefaultConfig CreateDefaultConfig, ...) component.ExporterFactory
- func NewLogsExporter(cfg configmodels.Exporter, logger *zap.Logger, pushLogsData PushLogsData, ...) (component.LogsExporter, error)
- func NewMetricsExporter(cfg configmodels.Exporter, logger *zap.Logger, pushMetricsData PushMetricsData, ...) (component.MetricsExporter, error)
- func NewThrottleRetry(err error, delay time.Duration) error
- func NewTraceExporter(cfg configmodels.Exporter, logger *zap.Logger, dataPusher traceDataPusher, ...) (component.TracesExporter, error)
- func NumTimeSeries(md consumerdata.MetricsData) int
- type CreateDefaultConfig
- type CreateLogsExporter
- type CreateMetricsExporter
- type CreateTraceExporter
- type ExporterOption
- type FactoryOption
- func WithCustomUnmarshaler(customUnmarshaler component.CustomUnmarshaler) FactoryOption
- func WithLogs(createLogsExporter CreateLogsExporter) FactoryOption
- func WithMetrics(createMetricsExporter CreateMetricsExporter) FactoryOption
- func WithTraces(createTraceExporter CreateTraceExporter) FactoryOption
- type PushLogsData
- type PushMetricsData
- type QueueSettings
- type RetrySettings
- type Shutdown
- type Start
- type TimeoutSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶ added in v0.7.0
func NewFactory( cfgType configmodels.Type, createDefaultConfig CreateDefaultConfig, options ...FactoryOption) component.ExporterFactory
NewFactory returns a component.ExporterFactory.
func NewLogsExporter ¶
func NewLogsExporter( cfg configmodels.Exporter, logger *zap.Logger, pushLogsData PushLogsData, options ...ExporterOption, ) (component.LogsExporter, error)
NewLogsExporter creates an LogsExporter that records observability metrics and wraps every request with a Span.
func NewMetricsExporter ¶
func NewMetricsExporter( cfg configmodels.Exporter, logger *zap.Logger, pushMetricsData PushMetricsData, options ...ExporterOption, ) (component.MetricsExporter, error)
NewMetricsExporter creates an MetricsExporter that records observability metrics and wraps every request with a Span.
func NewTraceExporter ¶
func NewTraceExporter( cfg configmodels.Exporter, logger *zap.Logger, dataPusher traceDataPusher, options ...ExporterOption, ) (component.TracesExporter, error)
NewTraceExporter creates a TracesExporter that records observability metrics and wraps every request with a Span.
func NumTimeSeries ¶
func NumTimeSeries(md consumerdata.MetricsData) int
NumTimeSeries returns the number of timeseries in a MetricsData.
Types ¶
type CreateDefaultConfig ¶ added in v0.7.0
type CreateDefaultConfig func() configmodels.Exporter
CreateDefaultConfig is the equivalent of component.ExporterFactory.CreateDefaultConfig()
type CreateLogsExporter ¶ added in v0.7.0
type CreateLogsExporter func(context.Context, component.ExporterCreateParams, configmodels.Exporter) (component.LogsExporter, error)
CreateMetricsExporter is the equivalent of component.ExporterFactory.CreateLogsExporter()
type CreateMetricsExporter ¶ added in v0.7.0
type CreateMetricsExporter func(context.Context, component.ExporterCreateParams, configmodels.Exporter) (component.MetricsExporter, error)
CreateMetricsExporter is the equivalent of component.ExporterFactory.CreateMetricsExporter()
type CreateTraceExporter ¶ added in v0.7.0
type CreateTraceExporter func(context.Context, component.ExporterCreateParams, configmodels.Exporter) (component.TracesExporter, error)
CreateTraceExporter is the equivalent of component.ExporterFactory.CreateTracesExporter()
type ExporterOption ¶
type ExporterOption func(*internalOptions)
ExporterOption apply changes to internalOptions.
func WithQueue ¶ added in v0.7.0
func WithQueue(queueSettings QueueSettings) ExporterOption
WithQueue overrides the default QueueSettings for an exporter. The default QueueSettings is to disable queueing.
func WithRetry ¶ added in v0.7.0
func WithRetry(retrySettings RetrySettings) ExporterOption
WithRetry overrides the default RetrySettings for an exporter. The default RetrySettings is to disable retries.
func WithShutdown ¶
func WithShutdown(shutdown Shutdown) ExporterOption
WithShutdown overrides the default Shutdown function for an exporter. The default shutdown function does nothing and always returns nil.
func WithStart ¶ added in v0.6.0
func WithStart(start Start) ExporterOption
WithStart overrides the default Start function for an exporter. The default shutdown function does nothing and always returns nil.
func WithTimeout ¶ added in v0.7.0
func WithTimeout(timeoutSettings TimeoutSettings) ExporterOption
WithTimeout overrides the default TimeoutSettings for an exporter. The default TimeoutSettings is 5 seconds.
type FactoryOption ¶ added in v0.7.0
type FactoryOption func(o *factory)
FactoryOption apply changes to ExporterOptions.
func WithCustomUnmarshaler ¶ added in v0.8.0
func WithCustomUnmarshaler(customUnmarshaler component.CustomUnmarshaler) FactoryOption
WithCustomUnmarshaler implements component.ConfigUnmarshaler.
func WithLogs ¶ added in v0.7.0
func WithLogs(createLogsExporter CreateLogsExporter) FactoryOption
WithLogs overrides the default "error not supported" implementation for CreateLogsReceiver.
func WithMetrics ¶ added in v0.7.0
func WithMetrics(createMetricsExporter CreateMetricsExporter) FactoryOption
WithMetrics overrides the default "error not supported" implementation for CreateMetricsReceiver.
func WithTraces ¶ added in v0.7.0
func WithTraces(createTraceExporter CreateTraceExporter) FactoryOption
WithTraces overrides the default "error not supported" implementation for CreateTracesReceiver.
type PushLogsData ¶
PushLogsData is a helper function that is similar to ConsumeLogsData but also returns the number of dropped logs.
type PushMetricsData ¶
PushMetricsData is a helper function that is similar to ConsumeMetricsData but also returns the number of dropped metrics.
type QueueSettings ¶ added in v0.7.0
type QueueSettings struct { // Enabled indicates whether to not enqueue batches before sending to the consumerSender. Enabled bool `mapstructure:"enabled"` // NumConsumers is the number of consumers from the queue. NumConsumers int `mapstructure:"num_consumers"` // QueueSize is the maximum number of batches allowed in queue at a given time. QueueSize int `mapstructure:"queue_size"` }
QueueSettings defines configuration for queueing batches before sending to the consumerSender.
func CreateDefaultQueueSettings ¶ added in v0.7.0
func CreateDefaultQueueSettings() QueueSettings
CreateDefaultQueueSettings returns the default settings for QueueSettings.
type RetrySettings ¶ added in v0.7.0
type RetrySettings struct { // Enabled indicates whether to not retry sending batches in case of export failure. Enabled bool `mapstructure:"enabled"` // InitialInterval the time to wait after the first failure before retrying. InitialInterval time.Duration `mapstructure:"initial_interval"` // MaxInterval is the upper bound on backoff interval. Once this value is reached the delay between // consecutive retries will always be `MaxInterval`. MaxInterval time.Duration `mapstructure:"max_interval"` // MaxElapsedTime is the maximum amount of time (including retries) spent trying to send a request/batch. // Once this value is reached, the data is discarded. MaxElapsedTime time.Duration `mapstructure:"max_elapsed_time"` }
RetrySettings defines configuration for retrying batches in case of export failure. The current supported strategy is exponential backoff.
func CreateDefaultRetrySettings ¶ added in v0.7.0
func CreateDefaultRetrySettings() RetrySettings
CreateDefaultRetrySettings returns the default settings for RetrySettings.
type Start ¶ added in v0.6.0
Start specifies the function invoked when the exporter is being started.
type TimeoutSettings ¶ added in v0.7.0
type TimeoutSettings struct { // Timeout is the timeout for every attempt to send data to the backend. Timeout time.Duration `mapstructure:"timeout"` }
Settings for timeout. The timeout applies to individual attempts to send data to the backend.
func CreateDefaultTimeoutSettings ¶ added in v0.7.0
func CreateDefaultTimeoutSettings() TimeoutSettings
CreateDefaultTimeoutSettings returns the default settings for TimeoutSettings.