Documentation ¶
Index ¶
- func MetricViews(level telemetry.Level) []*view.View
- func NewBatcher(name string, logger *zap.Logger, sender consumer.TraceConsumer, opts ...Option) consumer.TraceConsumer
- type Config
- type Factory
- func (f *Factory) CreateDefaultConfig() configmodels.Processor
- func (f *Factory) CreateMetricsProcessor(logger *zap.Logger, nextConsumer consumer.MetricsConsumer, ...) (processor.MetricsProcessor, error)
- func (f *Factory) CreateTraceProcessor(logger *zap.Logger, nextConsumer consumer.TraceConsumer, ...) (processor.TraceProcessor, error)
- func (f *Factory) Type() string
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricViews ¶
MetricViews returns the metrics views related to batching
func NewBatcher ¶
func NewBatcher(name string, logger *zap.Logger, sender consumer.TraceConsumer, opts ...Option) consumer.TraceConsumer
NewBatcher creates a new batcher that batches spans by node and resource
Types ¶
type Config ¶
type Config struct { configmodels.ProcessorSettings `mapstructure:",squash"` // Timeout sets the time after which a batch will be sent regardless of size. Timeout *time.Duration `mapstructure:"timeout,omitempty"` // SendBatchSize is the size of a batch which after hit, will trigger it to be sent. SendBatchSize *int `mapstructure:"send-batch-size,omitempty"` // NumTickers sets the number of tickers to use to divide the work of looping // over batch buckets. This is an advanced configuration option. NumTickers int `mapstructure:"num-tickers,omitempty"` // TickTime sets time interval at which the tickers tick. This is an advanced // configuration option. TickTime *time.Duration `mapstructure:"tick-time,omitempty"` // RemoveAfterTicks is the number of ticks that must pass without a span arriving // from a node after which the batcher for that node will be deleted. This is an // advanced configuration option. RemoveAfterTicks *int `mapstructure:"remove-after-ticks,omitempty"` }
Config defines configuration for batch processor.
type Factory ¶
type Factory struct { }
Factory is the factory for batch processor.
func (*Factory) CreateDefaultConfig ¶
func (f *Factory) CreateDefaultConfig() configmodels.Processor
CreateDefaultConfig creates the default configuration for processor.
func (*Factory) CreateMetricsProcessor ¶
func (f *Factory) CreateMetricsProcessor( logger *zap.Logger, nextConsumer consumer.MetricsConsumer, cfg configmodels.Processor, ) (processor.MetricsProcessor, error)
CreateMetricsProcessor creates a metrics processor based on this config.
func (*Factory) CreateTraceProcessor ¶
func (f *Factory) CreateTraceProcessor( logger *zap.Logger, nextConsumer consumer.TraceConsumer, c configmodels.Processor, ) (processor.TraceProcessor, error)
CreateTraceProcessor creates a trace processor based on this config.
type Option ¶
type Option func(b *batcher)
Option is an option to nodebatcher.
func WithNumTickers ¶
WithNumTickers sets the number of tickers to use to divide the work of looping over all nodebuckets.
func WithRemoveAfterTicks ¶
WithRemoveAfterTicks sets the number of ticks that must pass without new spans arriving for a node before that node is deleted from the batcher.
func WithSendBatchSize ¶
WithSendBatchSize sets the size after which a batch will be sent.
func WithTickTime ¶
WithTickTime sets the time interval at which the tickers will tick.
func WithTimeout ¶
WithTimeout sets the time after which a batch will be sent regardless of its size.