filter

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Match(name string, tags map[string]string) bool
	IsHistogramMetric(name string) bool
}

Filter will compare metrics names and tags against regex

func NewGlobFilter

func NewGlobFilter(cfg *Filters) Filter

NewGlobFilter grate a new Filter using gobwas/glob as regex engine

type Filters

type Filters struct {
	MetricsBlackList []string
	MetricsWhiteList []string
	MetricsToHisList []string

	MetricsTagBlackList TagFilter
	MetricsTagWhiteList TagFilter

	TagInclude []string
	TagExclude []string
}

Filters holds metrics white and black list filters

type TagFilter

type TagFilter map[string][]string

TagFilter is used to deifne tag filters

func (*TagFilter) Decode

func (f *TagFilter) Decode(filters string) error

Decode env variables into TagFilter type

Jump to

Keyboard shortcuts

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