Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByAttribute ¶
func ByAttribute[T any](config AttributeFamilyConfig, getters attributes.NamedGetters[T, string]) pipe.MiddleProvider[[]T, []T]
ByAttribute provides a pipeline node that drops all the records of type T (*ebpf.Record, or *request.Span) that do not match the provided AttributeFamilyConfig.
Types ¶
type AttributeFamilyConfig ¶
type AttributeFamilyConfig map[string]MatchDefinition
AttributeFamilyConfig maps, for a given record, each attribute with its MatchDefinition
type AttributesConfig ¶
type AttributesConfig struct {
Application AttributeFamilyConfig `yaml:"application"`
Network AttributeFamilyConfig `yaml:"network"`
}
AttributesConfig stores the user-provided section for filtering either Application or Network records by attribute values
type MatchDefinition ¶
type MatchDefinition struct {
// Match stores the glob that a given attribute must match to let the record pass
Match string `yaml:"match"`
// NotMatch stores the glob that a given attribute MUST NOT match to let the record pass
NotMatch string `yaml:"not_match"`
}
MatchDefinition stores the user-provided definition for the record filtering.
func (*MatchDefinition) Validate ¶
func (md *MatchDefinition) Validate() error
type Matcher ¶
type Matcher[T any] struct { // Glob will be compared with the value of the field Glob glob.Glob // Negate the condition value Negate bool // Getter for the field to be compared with the Glob Getter attributes.Getter[T, string] }
Matcher condition for a given field of the record type T.
Click to show internal directories.
Click to hide internal directories.