propfilters

package
v4.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package propfilters has logic describing the filtering of unwanted properties. Filters are configured from the agent configuration file and is intended to be passed into each monitor for use if it sends propeties on its own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DimPropsFilter

type DimPropsFilter interface {
	// Filters out properties from DimProperties object
	FilterDimProps(dimProps *types.DimProperties) *types.DimProperties
	MatchesDimension(name string, value string) bool
	FilterProperties(properties map[string]string) map[string]string
}

DimPropsFilter is designed to filter SignalFx property objects. It can filter based on property names, property values, dimension names, and dimension values. It also supports both static, globbed, and regex patterns for filter values. All properties matched will be filtered.

func New

func New(propertyNames []string, propertyValues []string, dimensionNames []string,
	dimensionValues []string) (DimPropsFilter, error)

New returns a new filter with the given configuration

type FilterSet

type FilterSet struct {
	Filters []DimPropsFilter
}

FilterSet is a collection of property filters, any one of which must match for a property to be matched.

func (*FilterSet) FilterDimProps

func (fs *FilterSet) FilterDimProps(dimProps *types.DimProperties) *types.DimProperties

FilterDimProps sends a *types.DimProperties through each of the filters in the set and filters properties. All original properties will be returned if no filter matches , or a subset of the original if some are filtered, or nil if all are filtered.

Jump to

Keyboard shortcuts

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