filterprocessor

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

Filter Processor

Supported pipeline types: metrics

The filter processor can be configured to include or exclude metrics based on metric name. Please refer to config.go for the config spec.

It takes a pipeline type, of which only metrics is supported, followed by an action:

  • include: Any names NOT matching filters are excluded from remainder of pipeline
  • exclude: Any names matching filters are excluded from remainder of pipeline

For the actions the following parameters are required:

  • match_type: strict|regexp
  • metric_names: list of strings or re2 regex patterns

More details can found at include/exclude metrics.

Examples:

processors:
  filter/1:
    metrics:
      include:
        match_type: regexp
        metric_names:
        - prefix/.*
        - prefix_.*
      exclude:
        match_type: strict
        metric_names:
        - hello_world
        - hello/world

Refer to the config files in testdata for detailed examples on using the processor.

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory added in v0.6.0

func NewFactory() component.ProcessorFactory

NewFactory returns a new factory for the Filter processor.

Types

type Config

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

Config defines configuration for Resource processor.

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.

Jump to

Keyboard shortcuts

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