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

package filterprocessor

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

Overview

Package filterprocessor implements a processor for filtering (dropping) metrics and/or spans by various properties.

Index

type Config

type Config struct {
	configmodels.ProcessorSettings `mapstructure:",squash"`
	Metrics                        MetricFilters `mapstructure:"metrics"`
}

Config defines configuration for Resource processor.

type Factory

type Factory struct {
}

Factory is the factory for filter 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.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,
	c configmodels.Processor,
) (component.TraceProcessorOld, 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 Option config created by this factory.

type MetricFilters

type MetricFilters struct {
	// Include match properties describe metrics that should be included in the Collector Service pipeline,
	// all other metrics should be dropped from further processing.
	// If both Include and Exclude are specified, Include filtering occurs first.
	Include *filtermetric.MatchProperties `mapstructure:"include"`

	// Exclude match properties describe metrics that should be excluded from the Collector Service pipeline,
	// all other metrics should be included.
	// If both Include and Exclude are specified, Include filtering occurs first.
	Exclude *filtermetric.MatchProperties `mapstructure:"exclude"`
}

MetricFilter filters by Metric properties.

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

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier