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

package processortest

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

Index

func NewNopMetricsProcessor

func NewNopMetricsProcessor(nextMetricsProcessor consumer.MetricsConsumerOld) consumer.MetricsConsumerOld

NewNopMetricsProcessor creates an MetricsProcessor that just pass the received data to the nextMetricsProcessor.

func NewNopTraceProcessor

func NewNopTraceProcessor(nextTraceProcessor consumer.TraceConsumerOld) consumer.TraceConsumerOld

NewNopTraceProcessor creates an TraceProcessor that just pass the received data to the nextTraceProcessor.

type NopProcessorFactory

type NopProcessorFactory struct{}

NopProcessorFactory allows the creation of the no operation processor via config, so it can be used in tests that cannot create it directly.

func (*NopProcessorFactory) CreateDefaultConfig

func (npf *NopProcessorFactory) CreateDefaultConfig() configmodels.Processor

CreateDefaultConfig creates the default configuration for the Processor.

func (*NopProcessorFactory) CreateMetricsProcessor

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

CreateMetricsProcessor creates a metrics processor based on this config. If the processor type does not support metrics or if the config is not valid error will be returned instead.

func (*NopProcessorFactory) CreateTraceProcessor

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

CreateTraceProcessor creates a trace processor based on this config. If the processor type does not support tracing or if the config is not valid error will be returned instead.

func (*NopProcessorFactory) Type

func (npf *NopProcessorFactory) Type() configmodels.Type

Type gets the type of the Processor 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