filterlistimpl

package
v0.0.0-...-ef3af43 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package filterlistimpl provides the implementation for the filterlist/rc component

Index

Constants

This section is empty.

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, log log.Component) 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

NewFilterList loads the local config. Note that registering with RC happens via separate methods (OnUpdateMetricFilterList, OnUpdateTagFilterList) called from the packages that use FilterList.

func (*FilterList) GetHistoFilterList

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

GetHistoFilterList returns the current histogram-specific metric filterlistdef. This is a subset of the full metric filterlist containing only entries that match histogram aggregate suffixes. It is used by DogStatsD workers which pre-filter regular metrics in listeners; only histogram-derived names need post-aggregation filtering.

func (*FilterList) GetMetricFilterList

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

GetMetricFilterList returns the current metric filterlist.

func (*FilterList) GetTagFilterList

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

GetTagFilterList returns the current tag filterlistdef.

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(filterlistdef.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       filterlistdef.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