filterlistimpl

package
v0.0.0-...-7a3c63a Latest Latest
Warning

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

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

Documentation

Overview

Package filterlistimpl provides the implementation for the filterlist/rc component

Index

Constants

View Source
const (
	Exclude action = true
	Include action = false
)

Variables

This section is empty.

Functions

func NewEmptyTagMatcher

func NewEmptyTagMatcher() filterlist.TagMatcher

func NewNoopFilterList

func NewNoopFilterList() filterlist.Component

func NewNoopTagMatcher

func NewNoopTagMatcher() filterlist.TagMatcher

func NewTagMatcher

func NewTagMatcher(metrics map[string]MetricTagList) filterlist.TagMatcher

Types

type FilterList

type FilterList struct {
	// contains filtered or unexported fields
}

func NewFilterList

func NewFilterList(log log.Component, config config.Component, telemetrycomp telemetry.Component) *FilterList

Load the config, registers with RC

func (*FilterList) GetMetricFilterList

func (fl *FilterList) GetMetricFilterList() utilstrings.Matcher

GetMetricFilterList returns the current metric filterlist.

func (*FilterList) GetTagFilterList

func (fl *FilterList) GetTagFilterList() filterlist.TagMatcher

GetTagFilterList returns the current tag filterlist.

func (*FilterList) OnUpdateMetricFilterList

func (fl *FilterList) OnUpdateMetricFilterList(onUpdate func(utilstrings.Matcher, utilstrings.Matcher))

OnUpdateMetricFilterList is called to register a callback to be called when the metric list is updated.

func (*FilterList) OnUpdateTagFilterList

func (fl *FilterList) OnUpdateTagFilterList(onUpdate func(filterlist.TagMatcher))

OnUpdateTagFilterList is called to register a callback to be called when the metric tag list is updated.

func (*FilterList) SetMetricFilterList

func (fl *FilterList) SetMetricFilterList(metricNames []string, matchPrefix bool)

SetMetricFilterList updates the metric names filter on all running worker.

func (*FilterList) SetTagFilterList

func (fl *FilterList) SetTagFilterList(metricTags map[string]MetricTagList)

SetTagFilterList takes a map of metric names to tag configuration, hashes the tags and stores the hashed configuration.

func (*FilterList) SetTagFilterListFromEntries

func (fl *FilterList) SetTagFilterListFromEntries(entries []MetricTagListEntry)

SetTagFilterListFromEntries takes a list of tag filter list objects that were loaded from the config file, converts and hashes the tags in a format used internally. Any registered callbacks are informed of the update.

type MetricTagList

type MetricTagList struct {
	Tags   []string `yaml:"tags"`
	Action string   `yaml:"action"`
}

MetricTagList is for loading the data from the configuration.

type MetricTagListEntry

type MetricTagListEntry struct {
	MetricName string   `mapstructure:"metric_name"`
	Action     string   `mapstructure:"action"`
	Tags       []string `mapstructure:"tags"`
}

MetricTagListEntry is for loading the new list-based configuration format.

type Provides

type Provides struct {
	Comp       filterlist.Component
	RCListener rctypes.ListenerProvider
}

Provides contains the RC component

func NewFilterListReq

func NewFilterListReq(req Requires) Provides

type Requires

type Requires struct {
	Cfg       config.Component
	Log       log.Component
	Telemetry telemetry.Component
}

Requires contains the config for RC

Jump to

Keyboard shortcuts

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