queuedprocessor

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultNumWorkers is the default number of workers consuming from the processor queue
	DefaultNumWorkers = 10
	// DefaultQueueSize is the default maximum number of span batches allowed in the processor's queue
	DefaultQueueSize = 1000
)

Variables

View Source
var Options options

Options is a factory for all available Option's

Functions

func MetricViews

func MetricViews(level telemetry.Level) []*view.View

MetricViews return the metrics views according to given telemetry level.

func NewQueuedSpanProcessor

func NewQueuedSpanProcessor(sender consumer.TraceConsumerOld, opts ...Option) component.TraceProcessorOld

NewQueuedSpanProcessor returns a span processor that maintains a bounded in-memory queue of span batches, and sends out span batches using the provided sender

Types

type Config

type Config struct {
	configmodels.ProcessorSettings `mapstructure:",squash"`

	// NumWorkers is the number of queue workers that dequeue batches and send them out.
	NumWorkers int `mapstructure:"num_workers"`
	// QueueSize is the maximum number of batches allowed in queue at a given time.
	QueueSize int `mapstructure:"queue_size"`
	// Retry indicates whether queue processor should retry span batches in case of processing failure.
	RetryOnFailure bool `mapstructure:"retry_on_failure"`
	// BackoffDelay is the amount of time a worker waits after a failed send before retrying.
	BackoffDelay time.Duration `mapstructure:"backoff_delay"`
}

Config defines configuration for Attributes processor.

type Factory

type Factory struct {
}

Factory is the factory for OpenCensus exporter.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() configmodels.Processor

CreateDefaultConfig creates the default configuration for exporter.

func (*Factory) CreateMetricsProcessor

func (f *Factory) CreateMetricsProcessor(
	logger *zap.Logger,
	nextConsumer consumer.MetricsConsumerOld,
	cfg configmodels.Processor,
) (component.MetricsProcessorOld, error)

CreateMetricsProcessor creates a metrics processor based on this config.

func (*Factory) CreateTraceProcessor

func (f *Factory) CreateTraceProcessor(
	logger *zap.Logger,
	nextConsumer consumer.TraceConsumerOld,
	cfg configmodels.Processor,
) (component.TraceProcessorOld, error)

CreateTraceProcessor creates a trace processor based on this config.

func (*Factory) Type

func (f *Factory) Type() string

Type gets the type of the Option config created by this factory.

type Option

type Option func(c *options)

Option is a function that sets some option on the component.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL