Back to godoc.org
go.opentelemetry.io/collector/processor/batchprocessor

package batchprocessor

v0.4.0
Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module: go.opentelemetry.io/collector

Index

func MetricViews

func MetricViews() []*view.View

MetricViews returns the metrics views related to batching

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 uint32 `mapstructure:"send_batch_size,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(
	ctx context.Context,
	params component.ProcessorCreateParams,
	nextConsumer consumer.MetricsConsumer,
	c configmodels.Processor,
) (component.MetricsProcessor, error)

CreateMetricsProcessor creates a metrics processor based on this config.

func (*Factory) CreateTraceProcessor

func (f *Factory) CreateTraceProcessor(
	ctx context.Context,
	params component.ProcessorCreateParams,
	nextConsumer consumer.TraceConsumer,
	c configmodels.Processor,
) (component.TraceProcessor, error)

CreateTraceProcessor creates a trace processor based on this config.

func (*Factory) Type

func (f *Factory) Type() configmodels.Type

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier